public void AddressModelRegionRayonTest() { BaseReportTests.InitDBAndLogin(); var model = new AddressModel(); List <SelectListItemSurrogate> regions = model.GetSelectedRegions(null); Assert.IsNotNull(regions); Assert.IsTrue(regions.Count > 1); RegionLookup anyRegion = model.InternalAddress(null).RegionLookup.First(r => r.idfsRegion > 0); Assert.IsTrue(model.GetRayons(null).Count == 1); model.RegionId = anyRegion.idfsRegion; Assert.IsTrue(model.GetRayons(null).Count > 1); }
public void AddressModelInternalTest() { BaseReportTests.InitDBAndLogin(); var model = new AddressModel(); Assert.IsNotNull(model.InternalAddress(null)); Assert.IsNotNull(model.InternalAddress(null).RegionLookup); Assert.IsTrue(model.InternalAddress(null).RegionLookup.Count > 1); RegionLookup anyRegion = model.InternalAddress(null).RegionLookup.First(r => r.idfsRegion > 0); Assert.IsTrue(model.InternalAddress(null).RayonLookup.Count == 1); model.InternalAddress(null).Region = anyRegion; Assert.IsTrue(model.InternalAddress(null).RayonLookup.Count > 1); }