public void IdTest() { ReactiveLoad target = new ReactiveLoad(); // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; target.Id = expected; actual = target.Id; Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
/// <summary> /// Deprecated Method for adding a new object to the ReactiveLoads EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToReactiveLoads(ReactiveLoad reactiveLoad) { base.AddObject("ReactiveLoads", reactiveLoad); }
/// <summary> /// Create a new ReactiveLoad object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="initialReactiveLoad">Initial value of the InitialReactiveLoad property.</param> /// <param name="currentReactiveLoad">Initial value of the CurrentReactiveLoad property.</param> /// <param name="minimalReactiveLoad">Initial value of the MinimalReactiveLoad property.</param> /// <param name="maximalReactiveLoad">Initial value of the MaximalReactiveLoad property.</param> public static ReactiveLoad CreateReactiveLoad(global::System.Int32 id, global::System.Double initialReactiveLoad, global::System.Double currentReactiveLoad, global::System.Double minimalReactiveLoad, global::System.Double maximalReactiveLoad) { ReactiveLoad reactiveLoad = new ReactiveLoad(); reactiveLoad.Id = id; reactiveLoad.InitialReactiveLoad = initialReactiveLoad; reactiveLoad.CurrentReactiveLoad = currentReactiveLoad; reactiveLoad.MinimalReactiveLoad = minimalReactiveLoad; reactiveLoad.MaximalReactiveLoad = maximalReactiveLoad; return reactiveLoad; }
public void ReactiveLoadConstructorTest() { ReactiveLoad target = new ReactiveLoad(); Assert.Inconclusive("TODO: Implement code to verify target"); }
public void NodesTest() { ReactiveLoad target = new ReactiveLoad(); // 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."); }
/// <summary> /// Insert specified NodeReactiveLoad in database /// </summary> /// <param name="dto">dto data for NodeReactiveLoad</param> public void InsertNodeReactiveLoad(NodeReactiveLoadDto 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.ReactiveLoads); ReactiveLoad rl = new ReactiveLoad(); rl.Id = dto.Id; rl.InitialReactiveLoad = dto.InitialReactiveLoad; rl.CurrentReactiveLoad = dto.CurrentReactiveLoad; rl.MinimalReactiveLoad = dto.MinimalReactiveLoad; rl.MaximalReactiveLoad = dto.MaximalReactiveLoad; //Adds new NodeReactiveLoad details to context dbContext.ReactiveLoads.AddObject(rl); //saves changes. dbContext.SaveChanges(); } catch (Exception exception) { throw new Exception("SmartGridDataMenagers: " + exception.Message); } }