public void GetModuleName_InstanceStatement_ReturnsModuleName() { const string statement = "no2 inst100408 ( .b(n36), .a(i0), .zn(o) );"; var result = _target.GetModuleName(statement); Assert.That(result, Is.EqualTo("no2")); }
public void Handle(BuildState state) { var instance = new Instance( state.NetlistSource, state.CurrentModuleName, _parser.GetModuleName(state.CurrentStatementTrimmed), _parser.GeInstanceName(state.CurrentStatementTrimmed) ) { Net = _parser.GetNet(state.CurrentStatementTrimmed).ToList() }; _instanceRepository.Add(instance); }