public void CreatePolygon2PointAdaptedOutput2Consumers() { ITimeSpaceOutput adaptee = new Output(xyPolygon.Caption + ".Flow") { SpatialDefinition = xyPolygon, ValueDefinition = waterLevelQuantity }; ITimeSpaceInput consumerA = new Input(xyPointA.Caption + ".Flow") { SpatialDefinition = xyPointA, ValueDefinition = waterLevelQuantity }; ITimeSpaceInput consumerB = new Input(xyPointB.Caption + ".Flow") { SpatialDefinition = xyPointB, ValueDefinition = waterLevelQuantity }; ITimeSpaceInput consumer = consumerB; IIdentifiable selectedAvailableAdaptedOutputId = adaptedOutputFactory.GetAvailableAdaptedOutputIds(adaptee, consumer)[1]; ITimeSpaceAdaptedOutput adaptedOutput = (ITimeSpaceAdaptedOutput)adaptedOutputFactory.CreateAdaptedOutput(selectedAvailableAdaptedOutputId, adaptee, consumer); adaptedOutput.AddConsumer(consumer); Assert.IsTrue(adaptedOutput.ElementSet().ElementType == ElementType.Point, "Consumer's ElementSet TYPE"); Assert.AreEqual(2, adaptedOutput.ElementSet().ElementCount, "ElementSet of consumer"); Assert.IsTrue(adaptedOutput.ValueDefinition == adaptee.ValueDefinition, "Adaptee's ValueDefinition"); }
public void CreatePolygon2PolylineAdaptedOutput() { ITimeSpaceOutput adaptee = new Output(xyPolygon.Caption + ".Flow") { SpatialDefinition = xyPolygon, ValueDefinition = waterLevelQuantity }; ITimeSpaceInput consumer = new Input(xyPolylineA.Caption + ".Flow") { SpatialDefinition = xyPolylineA, ValueDefinition = waterLevelQuantity }; IIdentifiable selectedAvailableAdaptedOutputId = adaptedOutputFactory.GetAvailableAdaptedOutputIds(adaptee, consumer)[1]; ITimeSpaceAdaptedOutput adaptedOutput = (ITimeSpaceAdaptedOutput)adaptedOutputFactory.CreateAdaptedOutput(selectedAvailableAdaptedOutputId, adaptee, consumer); adaptedOutput.AddConsumer(consumer); Assert.IsTrue(adaptedOutput.ElementSet() == consumer.ElementSet(), "Consumer's ElementSet"); Assert.IsTrue(adaptedOutput.ValueDefinition == adaptee.ValueDefinition, "Adaptee's ValueDefinition"); }