public void AddComponent() { var test = new NetList(); var component = new SimTestComponent(1); test.Add(component); }
public void GetVoltage2() { var test = new NetList(); var component = new SimTestComponent(2); test.Add(component); test.Simulate(); Assert.AreEqual(component.GetVoltageDrop(), 2); }
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); }
public Terminal(int voltage, SimTestComponent simTestComponent) { Voltage = voltage; _component = simTestComponent; }