Esempio n. 1
0
        public void Get_ShouldBeReturn_AllQuotes()
        {
            // Arrange
            var mockRepo = new Mock <IRepository <Frase> >();

            mockRepo.Setup(repo => repo.GetAll())
            .Returns(GetQuotes());

            var service = new QuoteService(mockRepo.Object);

            var controller = new QuoteController(service);

            // Act
            var result = controller.GetFrases();

            // Assert
            Assert.IsType <List <Frase> >(result);
            Assert.Equal(365, result.Count());
        }