Пример #1
0
        public void Get_WhenCalled_ReturnsSingle()
        {
            var expectedResult = "Rottie";

            // Act
            var okResult = _controller.GetBreedById(new Guid("ab2bd817-98cd-4cf3-a80a-53ea0cd9c202"));

            var okObject = okResult as OkObjectResult;
            // Assert

            var breedsList = (Breeds)okObject.Value;

            Assert.IsInstanceOf <OkObjectResult>(okResult);
            Assert.AreEqual(expectedResult, breedsList.Breed);
        }