public void GetPorts_OnePort_ReturnsPort() { const string statement = "input w1;"; var result = _target.GetPorts(statement); Assert.That(result, Has.Count.EqualTo(1)); Assert.That(result[0].PortName, Is.EqualTo("w1")); Assert.That(result[0].PortType, Is.EqualTo(PortType.Inout)); }
public void Handle(BuildState state) { var portType = _parser.GetPortType(state.CurrentStatementTrimmed); var portNames = _parser.GetPorts(state.CurrentStatementTrimmed).Select(p => p.PortName).ToList(); var module = _moduleRepository.Get(state.NetlistSource, state.CurrentModuleName); _moduleMutator.UpdatePortsType(module, portNames, portType); _moduleRepository.Update(module); }