Exemple #1
0
        public void DeveloperController_GetAll_ShouldReturnCorrectInt()
        {
            var result = _controller.GetAll();

            Assert.AreEqual(1, _mockService.CallCount);
            Assert.IsInstanceOfType(result, typeof(OkNegotiatedContentResult <IEnumerable <DeveloperListItem> >));
        }
        public void Web_api_should_return_all_developers_from_repository()
        {
            var result = _controller.GetAll() as OkNegotiatedContentResult <IEnumerable <DeveloperDto> >;

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Content);
            Assert.AreEqual(3, result.Content.Count());
        }