Ejemplo n.º 1
0
 public void IsPlayerSetYPassToContext()
 {
     var playerContext = new PlayerContext();
     var player = new Player(playerContext);
     player.SetY(1);
     Assert.AreEqual(1, playerContext.Y);
 }
Ejemplo n.º 2
0
 public void IsPlayerSetNamePassToContext()
 {
     var playerContext = new PlayerContext();
     var player = new Player(playerContext);
     player.SetName("pesho");
     Assert.AreEqual("pesho", playerContext.Name);
 }
Ejemplo n.º 3
0
 public void IsPlayerPrintReturnWriteString()
 {
     var player = new Player();
     player.SetName("pesho");
     player.SetScore(5);
     Assert.AreEqual(". pesho ---> 5 Score", player.Print());
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 5
0
 public void IsPlayerGetYGetFromContext()
 {
     var player = new Player();
     Assert.AreEqual(0, player.GetY());
 }
Ejemplo n.º 6
0
 public void IsPlayerGetNameGetFromContext()
 {
     var player = new Player();
     player.SetName("pesho");
     Assert.AreEqual("pesho", player.GetName());
 }