public CircuitInstantiationTests() { circuitDefinition = CircuitGenerator.GetLinearCircuit(); var modelCreators = new Dictionary <Type, Func <ICircuitDefinitionDevice, IModelInstantiationContext <LargeSignalCircuitModel> , IAnalysisDeviceModel <LargeSignalCircuitModel> > > { [typeof(Resistor)] = (e, ctx) => new LargeSignalResistor((Resistor)e), [typeof(VoltageSource)] = (e, ctx) => new LargeSignalVoltageSource((VoltageSource)e) }; context = new ModelInstantiationContext <LargeSignalCircuitModel>(modelCreators, new Dictionary <Type, Func <object, IModelInstantiationContext <LargeSignalCircuitModel>, object> >(), circuitDefinition); }
public AnalysisModelFactoryTests() { definition = CircuitGenerator.GetCircuitWithBasicDevices(); creator = new AnalysisModelCreator(); }