예제 #1
0
        public void AddComponent()
        {
            var test      = new NetList();
            var component = new SimTestComponent(1);

            test.Add(component);
        }
예제 #2
0
 public void GetVoltage2()
 {
     var test = new NetList();
     var component = new SimTestComponent(2);
     test.Add(component);
     test.Simulate();
     Assert.AreEqual(component.GetVoltageDrop(), 2);
 }
예제 #3
0
        public void GetVoltage2()
        {
            var test      = new NetList();
            var component = new SimTestComponent(2);

            test.Add(component);
            test.Simulate();
            Assert.AreEqual(component.GetVoltageDrop(), 2);
        }
예제 #4
0
 public void GetVoltageTwoComponent4()
 {
     var test = new NetList();
     var component = new SimTestComponent(3);
     test.Add(component);
     var component2 = new SimTestComponent(3);
     test.Add(component2);
     test.AddConnection(component.Bottom, component2.Top);
     test.Simulate();
     Assert.AreEqual(NetList.GetVoltageDrop(component.Top, component2.Bottom), 6);
 }
예제 #5
0
        public void GetVoltageTwoComponent4()
        {
            var test      = new NetList();
            var component = new SimTestComponent(3);

            test.Add(component);
            var component2 = new SimTestComponent(3);

            test.Add(component2);
            test.AddConnection(component.Bottom, component2.Top);
            test.Simulate();
            Assert.AreEqual(NetList.GetVoltageDrop(component.Top, component2.Bottom), 6);
        }
예제 #6
0
 public Terminal(int voltage, SimTestComponent simTestComponent)
 {
     Voltage    = voltage;
     _component = simTestComponent;
 }
예제 #7
0
 public void AddComponent()
 {
     var test = new NetList();
     var component = new SimTestComponent(1);
     test.Add(component);
 }
예제 #8
0
 public Terminal(int voltage, SimTestComponent simTestComponent)
 {
     Voltage = voltage;
     _component = simTestComponent;
 }