public void testPaperScissorExpectScissorsCutPaper() { Mock <IRockPaperScissorUi> mockUI = new Mock <IRockPaperScissorUi>(); RockPaperScissor rockpaperscissor = new RockPaperScissor(mockUI.Object); Player paper = new Paper(rockpaperscissor); Player scissor = new Scissor(rockpaperscissor); rockpaperscissor.play(paper, scissor); mockUI.Verify(m => m.updateUI("Scissors Cut Paper")); }
public void testRockScissorExpectRockCrushesScissors() { Mock <IRockPaperScissorUi> mockUI = new Mock <IRockPaperScissorUi>(); RockPaperScissor rockpaperscissor = new RockPaperScissor(mockUI.Object); Player rock = new Rock(rockpaperscissor); Player scissor = new Scissor(rockpaperscissor); rockpaperscissor.play(rock, scissor); mockUI.Verify(m => m.updateUI("Rock Crushes Scissor")); }
public void testRockPaperExpectPaperCoversRock(Player one, Player two, string expected) { rockpaperscissor.play(one, two); static_mockUI.Verify(m => m.updateUI(expected));//FAILS - the call never performs. }