コード例 #1
0
        public void TestThrowsWhenFloatingNodeInSubcircuit()
        {
            builder.AddResistor(1, 0, 1);
            builder.AddResistor(1, 2, 2);
            builder.AddResistor(0, 2, 3);
            builder.AddCurrentSource(1, 0, 5);

            // add device 'far away'
            builder.AddResistor(3, 4, 3);

//            builder.BuildSubcircuit(new []{1,4});
            Assert.Throws <NotConnectedSubcircuitException>(() => builder.BuildSubcircuit(new[] { 1, 4 }));
        }