Ejemplo n.º 1
0
 public void CurrentActiveLoadTest()
 {
     ActiveLoad target = new ActiveLoad(); // TODO: Initialize to an appropriate value
     double expected = 0F; // TODO: Initialize to an appropriate value
     double actual;
     target.CurrentActiveLoad = expected;
     actual = target.CurrentActiveLoad;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 /// <summary>
 /// Create a new ActiveLoad object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="initialActiveLoad">Initial value of the InitialActiveLoad property.</param>
 /// <param name="currentActiveLoad">Initial value of the CurrentActiveLoad property.</param>
 /// <param name="minimalActiveLoad">Initial value of the MinimalActiveLoad property.</param>
 /// <param name="maximalActiveLoad">Initial value of the MaximalActiveLoad property.</param>
 public static ActiveLoad CreateActiveLoad(global::System.Int32 id, global::System.Double initialActiveLoad, global::System.Double currentActiveLoad, global::System.Double minimalActiveLoad, global::System.Double maximalActiveLoad)
 {
     ActiveLoad activeLoad = new ActiveLoad();
     activeLoad.Id = id;
     activeLoad.InitialActiveLoad = initialActiveLoad;
     activeLoad.CurrentActiveLoad = currentActiveLoad;
     activeLoad.MinimalActiveLoad = minimalActiveLoad;
     activeLoad.MaximalActiveLoad = maximalActiveLoad;
     return activeLoad;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ActiveLoads EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToActiveLoads(ActiveLoad activeLoad)
 {
     base.AddObject("ActiveLoads", activeLoad);
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Insert specified NodeActiveLoad in database
        /// </summary>
        /// <param name="dto">dto data for NodeActiveLoad</param>
        public void InsertNodeActiveLoad(NodeActiveLoadDto dto)
        {
            try
            {
                //Before any action, it must be updated because calls from contract uses
                //only one instance of UserManager.
                dbContext.Refresh(System.Data.Objects.RefreshMode.StoreWins, dbContext.ActiveLoads);
                ActiveLoad al = new ActiveLoad();

                al.Id = dto.Id;
                al.InitialActiveLoad = dto.InitialActiveLoad;
                al.CurrentActiveLoad = dto.CurrentActiveLoad;
                al.MinimalActiveLoad = dto.MinimalActiveLoad;
                al.MaximalActiveLoad = dto.MaximalActiveLoad;

                //Adds new NodeActiveLoad details to context
                dbContext.ActiveLoads.AddObject(al);

                //saves changes.
                dbContext.SaveChanges();
            }
            catch (Exception exception)
            {
                throw new Exception("SmartGridDataMenagers: " + exception.Message);
            }
        }
Ejemplo n.º 5
0
 public void ActiveLoadConstructorTest()
 {
     ActiveLoad target = new ActiveLoad();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Ejemplo n.º 6
0
 public void NodesTest()
 {
     ActiveLoad target = new ActiveLoad(); // TODO: Initialize to an appropriate value
     EntityCollection<Node> expected = null; // TODO: Initialize to an appropriate value
     EntityCollection<Node> actual;
     target.Nodes = expected;
     actual = target.Nodes;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }