Пример #1
0
        public void Exercise_PostPlayer()
        {
            // Arrange
            var player = new Web.Domain.Models.Player()
            {
                AccountDBID = 123456789, Name = "ElmerFudd"
            };

            // Act
            var actual = WebApiService.PostPlayer(player).Result;

            // Assert
            Assert.AreEqual(player.AccountDBID, actual.AccountDBID);
            Assert.AreEqual(player.Name, actual.Name);
            Assert.AreNotEqual(0, actual.PlayerId);

            // TODO: Cleanup the record out of the database?  Or will we just recreate the database prior to each test
        }