using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Pinwheel.SCM.AwardContexts; namespace Pinwheel.SCM.Rules { [TestClass] public class BuildBrokenRuleTests { [TestMethod] public void Execute_should_give_medal_for_broken_build() { var awardsService = new Mock(); awardsService .Expect(s => s.BestowAward(It.IsAny())) .Verifiable(); new BuildBrokenRule() .Execute(new BuildAwardContext { AwardService = awardsService.Object, BuildSuccessful = false, User = new ScmUser() }); awardsService.VerifyAll(); } } }