Ejemplo n.º 1
0
 public void ActiveLoadTest()
 {
     Node target = new Node(); // TODO: Initialize to an appropriate value
     ActiveLoad expected = null; // TODO: Initialize to an appropriate value
     ActiveLoad actual;
     target.ActiveLoad = expected;
     actual = target.ActiveLoad;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Nodes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToNodes(Node node)
 {
     base.AddObject("Nodes", node);
 }
 /// <summary>
 /// Create a new Node object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="nodeTypeId">Initial value of the NodeTypeId property.</param>
 /// <param name="nodeName">Initial value of the NodeName property.</param>
 /// <param name="activeLoadId">Initial value of the ActiveLoadId property.</param>
 /// <param name="reactiveLoadId">Initial value of the ReactiveLoadId property.</param>
 /// <param name="voltageId">Initial value of the VoltageId property.</param>
 public static Node CreateNode(global::System.Int32 id, global::System.Int32 nodeTypeId, global::System.String nodeName, global::System.Int32 activeLoadId, global::System.Int32 reactiveLoadId, global::System.Int32 voltageId)
 {
     Node node = new Node();
     node.Id = id;
     node.NodeTypeId = nodeTypeId;
     node.NodeName = nodeName;
     node.ActiveLoadId = activeLoadId;
     node.ReactiveLoadId = reactiveLoadId;
     node.VoltageId = voltageId;
     return node;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Insert specified node in database
        /// </summary>
        /// <param name="dto">dto data for node</param>
        public void InsertNode(NodeDto 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.Nodes);
                Node nd = new Node();

                nd.Id = dto.Id;
                nd.NodeName = dto.NodeName;
                nd.NodeTypeId = dto.NodeTypeId;
                nd.ActiveLoadId = dto.ActiveLoadId;
                nd.ReactiveLoadId = dto.ReactiveLoadId;
                nd.VoltageId = dto.VoltageId;

                //Adds new node details to context
                dbContext.Nodes.AddObject(nd);

                //saves changes.
                dbContext.SaveChanges();
            }
            catch (Exception exception)
            {
                throw new Exception("SmartGridDataMenagers: " + exception.Message);
            }
        }
Ejemplo n.º 5
0
 public void AddressesTest()
 {
     Node target = new Node(); // TODO: Initialize to an appropriate value
     EntityCollection<Address> expected = null; // TODO: Initialize to an appropriate value
     EntityCollection<Address> actual;
     target.Addresses = expected;
     actual = target.Addresses;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 6
0
 public void VoltageReferenceTest()
 {
     Node target = new Node(); // TODO: Initialize to an appropriate value
     EntityReference<Voltage> expected = null; // TODO: Initialize to an appropriate value
     EntityReference<Voltage> actual;
     target.VoltageReference = expected;
     actual = target.VoltageReference;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 7
0
 public void VoltageIdTest()
 {
     Node target = new Node(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     target.VoltageId = expected;
     actual = target.VoltageId;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 8
0
 public void NodeNameTest()
 {
     Node target = new Node(); // TODO: Initialize to an appropriate value
     string expected = string.Empty; // TODO: Initialize to an appropriate value
     string actual;
     target.NodeName = expected;
     actual = target.NodeName;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Ejemplo n.º 9
0
 public void NodeConstructorTest()
 {
     Node target = new Node();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }