Esempio n. 1
0
        public void TestVenueAnalyser_LocationFiltering()
        {
            var employer = new ApprenticeshipLocation
            {
                RecordStatus = (int)ApprenticeshipStatus.Live,
                LocationType = LocationType.Venue,
                ApprenticeshipLocationType = ApprenticeshipLocationType.EmployerBased,
            };

            var classroom = new ApprenticeshipLocation
            {
                RecordStatus = (int)ApprenticeshipStatus.Live,
                LocationType = LocationType.Venue,
                ApprenticeshipLocationType = ApprenticeshipLocationType.ClassroomBased,
            };

            var both = new ApprenticeshipLocation
            {
                RecordStatus = (int)ApprenticeshipStatus.Live,
                LocationType = LocationType.Venue,
                ApprenticeshipLocationType = ApprenticeshipLocationType.ClassroomBasedAndEmployerBased,
            };

            var archived = new ApprenticeshipLocation
            {
                RecordStatus = (int)ApprenticeshipStatus.Archived,
                LocationType = LocationType.Venue,
                ApprenticeshipLocationType = ApprenticeshipLocationType.EmployerBased,
            };

            var region = new ApprenticeshipLocation
            {
                RecordStatus = (int)ApprenticeshipStatus.Live,
                LocationType = LocationType.Region,
                ApprenticeshipLocationType = ApprenticeshipLocationType.EmployerBased,
            };

            var subRegion = new ApprenticeshipLocation
            {
                RecordStatus = (int)ApprenticeshipStatus.Live,
                LocationType = LocationType.SubRegion,
                ApprenticeshipLocationType = ApprenticeshipLocationType.EmployerBased,
            };

            var locations = new List <ApprenticeshipLocation>
            {
                employer,
                classroom,
                both,
                archived,
                region,
                subRegion,
            };

            var expectedLocations = new List <ApprenticeshipLocation>
            {
                // employer,
                classroom,
                both,
                // archived,
                // region,
                // subRegion,
            };

            // Act
            var relevantApprenticeshipLocations = VenueAnalyser.RelevantApprenticeshipLocations(locations);

            // Assert
            relevantApprenticeshipLocations.Should().BeEquivalentTo(expectedLocations);
        }
Esempio n. 2
0
 public VenueAnalyserTests()
 {
     _venueAnalyser = new VenueAnalyser(new VenueCorrectionFinder());
 }