Exemplo n.º 1
0
        public void GetBudgetItemTypes_ReturnPagedAnonymousObject()
        {
            //Arrange
            var anonymousQueryable = new List <object>
            {
                new
                {
                    Id       = new Guid("01fab7d5-c8e9-4934-9adf-0ae25bd94b00"),
                    Value    = "Budget 1",
                    Position = 0
                },
                new
                {
                    Id       = new Guid("5466519b-d08c-40e7-9602-0188f607a673"),
                    Value    = "Budget 2",
                    Position = 1
                }
            }.AsQueryable();

            _dropdownRepository.GetBudgetItemTypes()
            .Returns(anonymousQueryable);

            //Act
            var response = _dropdownService.GetBudgetItemTypes();

            //Assert
            Assert.IsNotNull(response);
            Assert.AreEqual(anonymousQueryable.Count(), response.Count());
        }
Exemplo n.º 2
0
 public IQueryable <object> GetBudgetItemTypes()
 {
     return(_dropdownRepository.GetBudgetItemTypes());
 }