public void GetComponentID() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual("HydroNet", engineWrapper.GetComponentID()); }
public void Finish() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); engineWrapper.Finish(); }
public void GetInputExchangeItems() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual(2, engineWrapper.GetInputExchangeItemCount()); List <HydroNumerics.OpenMI.Sdk.Backbone.InputExchangeItem> inputExchangeItemsList = new List <InputExchangeItem>(); for (int i = 0; i < engineWrapper.GetInputExchangeItemCount(); i++) { inputExchangeItemsList.Add(engineWrapper.GetInputExchangeItem(i)); } InputExchangeItem inputExchangeItem = inputExchangeItemsList.First(myVar => myVar.Quantity.ID == "Flow"); Assert.AreEqual("Flow", inputExchangeItem.Quantity.ID); Assert.AreEqual("Inflow to Upper lake", inputExchangeItem.ElementSet.ID); Assert.AreEqual(ElementType.IDBased, inputExchangeItem.ElementSet.ElementType); inputExchangeItem = inputExchangeItemsList.First(myVar => myVar.Quantity.ID == "Head"); Assert.AreEqual("Head", inputExchangeItem.Quantity.ID); Assert.AreEqual("Groundwater boundary under Upper Lake", inputExchangeItem.ElementSet.ID); Assert.AreEqual(ElementType.XYPolygon, inputExchangeItem.ElementSet.ElementType); Assert.AreEqual(6, inputExchangeItem.ElementSet.GetVertexCount(0)); }
public void GetModelDescription() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual("No modeldescription available", engineWrapper.GetModelDescription()); }
public void GetModelID() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual("HydroNet test model", engineWrapper.GetModelID()); }
public void GetComponentDescription() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual("Conceptual model for trasport of water and solutes", engineWrapper.GetComponentDescription()); }
public void PerformTimeStep() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual(2, engineWrapper.HydroNetModel._waterBodies[0].CurrentStoredWater.Volume); engineWrapper.PerformTimeStep(); engineWrapper.Finish(); }
public void GetValues() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); engineWrapper.PerformTimeStep(); Assert.AreEqual(1, ((IScalarSet)engineWrapper.GetValues("Leakage", "Groundwater boundary under Upper Lake")).Count); Assert.AreEqual(22.384, ((IScalarSet)engineWrapper.GetValues("Leakage", "Groundwater boundary under Upper Lake")).GetScalar(0), 0.001); }
public ComBrowserView() { try { ConfigureLogging(); InitializeComponent(); _engineWrapper = new EngineWrapper(); _engineWrapper.Initialize(); Browser = _engineWrapper.CreateBrowser(); InitializeFrom(Browser); Browser.LoadUrl("teamdev.com/dotnetbrowser"); EventLogWrapper.Log("ComBrowserView initialized", EventLogEntryType.Information, 201); } catch (Exception e) { EventLogWrapper.Log(e.ToString(), EventLogEntryType.Error, 500); throw; } }
public void GetOutputExchangeItems() { EngineWrapper engineWrapper = new EngineWrapper(); engineWrapper.Initialize(arguments); Assert.AreEqual(1, engineWrapper.GetOutputExchangeItemCount()); List <HydroNumerics.OpenMI.Sdk.Backbone.OutputExchangeItem> outputExchangeItemsList = new List <OutputExchangeItem>(); for (int i = 0; i < engineWrapper.GetOutputExchangeItemCount(); i++) { outputExchangeItemsList.Add(engineWrapper.GetOutputExchangeItem(i)); } OutputExchangeItem outputExchangeItem = outputExchangeItemsList.First(myVar => myVar.Quantity.ID == "Leakage"); Assert.AreEqual("Leakage", outputExchangeItem.Quantity.ID); Assert.AreEqual("Groundwater boundary under Upper Lake", outputExchangeItem.ElementSet.ID); Assert.AreEqual(ElementType.XYPolygon, outputExchangeItem.ElementSet.ElementType); Assert.AreEqual(6, outputExchangeItem.ElementSet.GetVertexCount(0)); }