Beispiel #1
0
 public void IsPlayerSetYPassToContext()
 {
     var playerContext = new PlayerContext();
     var player = new Player(playerContext);
     player.SetY(1);
     Assert.AreEqual(1, playerContext.Y);
 }
Beispiel #2
0
 public void IsPlayerSetNamePassToContext()
 {
     var playerContext = new PlayerContext();
     var player = new Player(playerContext);
     player.SetName("pesho");
     Assert.AreEqual("pesho", playerContext.Name);
 }
Beispiel #3
0
 public void IsPlayerPrintReturnWriteString()
 {
     var player = new Player();
     player.SetName("pesho");
     player.SetScore(5);
     Assert.AreEqual(". pesho ---> 5 Score", player.Print());
 }
Beispiel #4
0
 public void IsPlayerAcceptSetVisitorToPlayer()
 {
     var mockVisitor = new Mock<IVisitor>();
     var player = new Player();
     mockVisitor.Setup(x => x.Visit(player)).Verifiable();
     player.Accept(mockVisitor.Object);
     mockVisitor.Verify();
 }
Beispiel #5
0
 public void IsPlayerGetYGetFromContext()
 {
     var player = new Player();
     Assert.AreEqual(0, player.GetY());
 }
Beispiel #6
0
 public void IsPlayerGetNameGetFromContext()
 {
     var player = new Player();
     player.SetName("pesho");
     Assert.AreEqual("pesho", player.GetName());
 }