BrowserCalls.Web.Test.Model.InMemoryTicketsRepository.All C# (CSharp) Метод

All() публичный Метод

public All ( ) : IEnumerable
Результат IEnumerable
        public IEnumerable<Ticket> All()
        {
            return _db;
        }

Usage Example

        public void GivenADashboardIndexRequest_ThenRespondAListOfExistingTickets()
        {
            var repository = new InMemoryTicketsRepository();
            repository.Create(new Ticket {Name = "ticket-one"});
            repository.Create(new Ticket {Name = "ticket-two"});

            var controller = GetDashboardController(repository);
            var result = controller.Index() as ViewResult;

            Assert.That(result.ViewData.Model, Is.EqualTo(repository.All()));
        }
All Usage Examples Of BrowserCalls.Web.Test.Model.InMemoryTicketsRepository::All
InMemoryTicketsRepository