Beispiel #1
0
        public void GetVehicles()
        {
            //Arrange
            var recentVehiclesFilter = new DTO.RecentVehicleFilter()
            {
                ContributedBy    = new string[] { fixtures.identityId.ToString() },
                ContributedAfter = DateTime.Now.AddYears(-1)
            };

            //Act
            var result = fixtures.recentQueryService.GetVehicles(recentVehiclesFilter);

            //Assert
            result.Should().NotBeEmpty();
            result.Count().Should().BeGreaterOrEqualTo(1);
        }
        public List <DTO.RecentVehicle> GetVehicles(DTO.RecentVehicleFilter filter)
        {
            var query = ApplyFilter(filter, UnitOfWork.GetEntityQuery <RecentVehicle>().OrderBy(v => v.SurrogateId));

            return(query.AsListOf <DTO.RecentVehicle>());
        }