public void CircuitNodeFactory_Encoder_Positive() { TestHelper.SetTestPaths(); INodeFactory factory = new CircuitNodeFactory(); INode node = factory.GetNode("testName", "ENCODER"); Assert.AreEqual(true, node is CircuitNode); Assert.AreEqual(true, node is IMultipleInputs); Assert.AreEqual(false, node is ISingleInput); Assert.AreEqual("testName", node.Name); Assert.AreEqual("ENCODER.txt", ((CircuitNode)node).Circuit.Name); }
private CircuitNode GetCalcCircuit() { string filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); Validator.InternalCircuitNamesForTests = new string[] { "INPUT_HIGH", "INPUT_LOW", "PROBE", "NAND", "OR", "AND", "NOT", "CALC", "DECODER", "ENCODER", "DECODER_ENABLABLE", "FULLADDER" }; CircuitNodeFactory.DifferentPathForTests = filePath + "../../../../Internal_Circuits/"; INodeFactory factory = new CircuitNodeFactory(); return((CircuitNode)factory.GetNode("testName", "CALC")); }