コード例 #1
0
        public void Get_WhenCalled_ReturnsAllItems()
        {
            var expectedResult = 5;

            // Act
            var okResult = _controller.GetAllBreeds();

            var okObject = okResult as OkObjectResult;
            // Assert

            var breedsList = (IEnumerable <Breeds>)okObject.Value;

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