public void TestGroupingMetadatas() { Profile profile = new ProfileBuilder(_profileRepository).Build(UrlKey, 1, AreaTypeIds.CountyAndUnitaryAuthority); // Assert: number of domains var count = profile.GroupingMetadatas.Count; Assert.IsTrue(count > 5 && count < 10); }
public void TestGetSelectedGroupingMetadata() { Profile profile = new ProfileBuilder(_profileRepository).Build(UrlKey, 1, AreaTypeIds.CountyAndUnitaryAuthority); Assert.AreEqual(profile.GetSelectedGroupingMetadata(1).GroupId, profile.GroupingMetadatas[0].GroupId); profile = new ProfileBuilder(_profileRepository).Build(UrlKey, 3, AreaTypeIds.CountyAndUnitaryAuthority); Assert.AreEqual(profile.GetSelectedGroupingMetadata(3).GroupId, profile.GroupingMetadatas[2].GroupId); // First is selected by default profile = new ProfileBuilder(_profileRepository).Build(UrlKey); Assert.AreEqual(profile.GetSelectedGroupingMetadata(1).GroupId, profile.GroupingMetadatas[0].GroupId); }
public void TestIndicatorNamesDefinedIfOnlyOneGrouping() { Profile profile = new ProfileBuilder(_profileRepository).Build( UrlKeys.Tobacco, 1, AreaTypeIds.CountyAndUnitaryAuthority); Assert.IsTrue(profile.IndicatorNames.Count > 0); }