public void GetRegionsByCategories() { RegionList regions; RegionCategoryList regionCategories; regionCategories = new RegionCategoryList(); // Add id 1 = Political Boundry IRegionCategory regionCategory = new RegionCategory(1, null, null, null, null, null, 0, 0, new DataContext(GetUserContext())); regionCategories.Add(regionCategory); // Add id 2 = Interest area regionCategory = new RegionCategory(2, null, null, null, null, null, 0, 0, new DataContext(GetUserContext())); regionCategories.Add(regionCategory); regions = GetRegionManager(true).GetRegionsByCategories(GetUserContext(), regionCategories); Assert.IsTrue(regions.IsNotEmpty()); // Get all provinces. regionCategory = CoreData.RegionManager.GetRegionCategory(GetUserContext(), 16); regions = CoreData.RegionManager.GetRegionsByCategory(GetUserContext(), regionCategory); Assert.IsTrue(regions.IsNotEmpty()); // Get all counties. regionCategory = CoreData.RegionManager.GetRegionCategory(GetUserContext(), 21); regions = CoreData.RegionManager.GetRegionsByCategory(GetUserContext(), regionCategory); Assert.IsTrue(regions.IsNotEmpty()); // Get all municipalities. regionCategory = CoreData.RegionManager.GetRegionCategory(GetUserContext(), 1); regions = CoreData.RegionManager.GetRegionsByCategory(GetUserContext(), regionCategory); Assert.IsTrue(regions.IsNotEmpty()); }
public void RegionCategoryName() { String name = "Name"; RegionCategory regionCategory = GetOneRegionCategory(GetUserContext()); Assert.AreEqual(regionCategory.Name, name); }
public void GetApartmentsByRegionCategory(ObservableCollection<Apartment> apartments, RegionCategory apartmentRegionCategory) { var allApartments = getApartments(); var filteredApartments = allApartments.Where(p => p.ApartmentRegion == apartmentRegionCategory).ToList(); apartments.Clear(); filteredApartments.ForEach(p => apartments.Add(p)); }
public void GetApartmentsByRegionCategory(ObservableCollection <Apartment> apartments, RegionCategory apartmentRegionCategory) { var allApartments = getApartments(); var filteredApartments = allApartments.Where(p => p.ApartmentRegion == apartmentRegionCategory).ToList(); apartments.Clear(); filteredApartments.ForEach(p => apartments.Add(p)); }
public void RegionCategoryId() { Int32 regionCategoryId; regionCategoryId = 1; RegionCategory regionCategory = GetOneRegionCategory(GetUserContext()); regionCategory.Id = regionCategoryId; Assert.IsNotNull(regionCategory.Id); Assert.AreEqual(regionCategory.Id, regionCategoryId); }
public Apartment(string apartmentId, RegionCategory apartmentRegion, CityCategory apartmentCity, RoomCategory apartmentRoomNumber, double apartmentRating, bool isApartmentAvailable, double apartmentPriceByNight) { ApartmentId = apartmentId; ApartmentRegion = apartmentRegion; ApartmentCity = apartmentCity; ApartmentRoomNumber = apartmentRoomNumber; ApartmentCoverImage = String.Format("Assets/ApartmentImages/CoverImages/{0}/FrontView.jpg", apartmentId); ApartmentInsideImage = String.Format("Assets/ApartmentImages/InsideImages/{0}/InsideView.jpg", apartmentId); ApartmentRating = apartmentRating; IsApartmentAvailable = isApartmentAvailable; ApartmentPriceByNight = apartmentPriceByNight; }
public void GetRegionsByCategories() { RegionList regions; RegionCategoryList regionCategories; regionCategories = new RegionCategoryList(); // Add id 1 = Political Boundry RegionCategory regionCategory = new RegionCategory(1, null, null, null, null, null, 0, 0, new DataContext(GetUserContext())); regionCategories.Add(regionCategory); // Add id 2 = Interest area regionCategory = new RegionCategory(2, null, null, null, null, null, 0, 0, new DataContext(GetUserContext())); regionCategories.Add(regionCategory); regions = GetRegionDataSource(true).GetRegionsByCategories(GetUserContext(), regionCategories); Assert.IsTrue(regions.IsNotEmpty()); }
public void SetRegionCategory(string text) { RegionCategory.SelectByText(text); }