public void Constructor_AssessmentSectionWithBackgroundData_BackgroundDataSet() { // Setup IAssessmentSection assessmentSection = new AssessmentSectionStub(); // Call DuneErosionFailureMechanismView view = CreateView(new DuneErosionFailureMechanism(), assessmentSection); // Assert MapDataTestHelper.AssertImageBasedMapData(assessmentSection.BackgroundData, view.Map.BackgroundMapData); }
public void ConvertFrom_BackgroundData_ReturnWmtsMapData(WmtsMapData mapData) { // Setup BackgroundData backgroundData = BackgroundDataConverter.ConvertTo(mapData); // Call ImageBasedMapData convertedMapData = BackgroundDataConverter.ConvertFrom(backgroundData); // Assert MapDataTestHelper.AssertImageBasedMapData(backgroundData, convertedMapData); }
public void Constructor_AssessmentSectionWithBackgroundData_BackgroundDataSet() { // Setup var assessmentSection = new AssessmentSectionStub(); // Call MacroStabilityInwardsFailureMechanismView view = CreateView(new MacroStabilityInwardsFailureMechanism(), assessmentSection); // Assert MapDataTestHelper.AssertImageBasedMapData(assessmentSection.BackgroundData, view.Map.BackgroundMapData); }
public void Constructor_AssessmentSectionWithBackgroundData_BackgroundDataSet() { // Setup var assessmentSection = new AssessmentSectionStub(); // Call AssessmentSectionReferenceLineView view = ShowCalculationsView(assessmentSection); // Assert MapDataTestHelper.AssertImageBasedMapData(assessmentSection.BackgroundData, view.Map.BackgroundMapData); }
public void Constructor_AssessmentSectionWithBackgroundData_BackgroundDataSet() { // Setup AssessmentSection assessmentSection = CreateAssessmentSection(); // Call using (var view = new AssemblyResultPerSectionMapView(assessmentSection)) { // Assert MapDataTestHelper.AssertImageBasedMapData(assessmentSection.BackgroundData, view.Map.BackgroundMapData); } }
public void ConvertFrom_BackgroundData_ReturnWellKnownMapData() { // Setup var random = new Random(21); var wellKnownTileSource = random.NextEnumValue <WellKnownTileSource>(); BackgroundData backgroundData = BackgroundDataConverter.ConvertTo(new WellKnownTileSourceMapData(wellKnownTileSource)); // Call ImageBasedMapData convertedMapData = BackgroundDataConverter.ConvertFrom(backgroundData); // Assert MapDataTestHelper.AssertImageBasedMapData(backgroundData, convertedMapData); }
public void Constructor_AssessmentSectionWithBackgroundData_BackgroundDataSet() { // Setup IAssessmentSection assessmentSection = new AssessmentSectionStub(); // Call using (StandAloneFailureMechanismView <IFailureMechanism <FailureMechanismSectionResult>, FailureMechanismSectionResult> view = CreateView(new TestFailureMechanism(), assessmentSection)) { // Assert MapDataTestHelper.AssertImageBasedMapData(assessmentSection.BackgroundData, view.Map.BackgroundMapData); } }
public void SetAllData_Always_SetsAllDataToMapControl() { // Setup var mapDataCollection = new MapDataCollection("Collection"); WmtsMapData backgroundMapData = WmtsMapDataTestHelper.CreateDefaultPdokMapData(); BackgroundData backgroundData = BackgroundDataConverter.ConvertTo(backgroundMapData); using (new UseCustomSettingsHelper(testSettingsHelper)) using (new UseCustomTileSourceFactoryConfig(backgroundMapData)) using (var riskeerMapControl = new RiskeerMapControl()) { // Call riskeerMapControl.SetAllData(mapDataCollection, backgroundData); // Assert Assert.AreSame(mapDataCollection, riskeerMapControl.MapControl.Data); Assert.IsNotNull(riskeerMapControl.MapControl.BackgroundMapData); MapDataTestHelper.AssertImageBasedMapData(backgroundData, riskeerMapControl.MapControl.BackgroundMapData); } }