public void CreateInputNetworkPort_Returns_Null_When_Parent_Element_Param_Is_Null() { //Arrange var fac = new PortFactory(); //Act IInputNetworkPort port = fac.CreateInputNetworkPort(Guid.Empty, null); //Assert Assert.Null(port); }
public void CreateInputNetworkPort_Returns_Instance() { //Arrange var fac = new PortFactory(); Guid id = Guid.NewGuid(); var mockElement = new Mock<IElement>(); //Act IInputNetworkPort port = fac.CreateInputNetworkPort(id, mockElement.Object); //Assert Assert.Equal(id, port.Id); Assert.NotNull(port); }
private IInputPortMgr CreateInputPortMgr(IElement parent, Guid mgrId, Guid port0Id) { IInputPortMgr inPortMgr = null; IInputNetworkPort inPort = null; using (PortMgrFactory fac = new PortMgrFactory()) { inPortMgr = fac.CreateInputPortMgr(); } using (PortFactory fac = new PortFactory()) { inPort = fac.CreateInputNetworkPort(port0Id, parent); } inPortMgr.Add(inPort); return inPortMgr; }
private IInputPortMgr CreateInputPortMgr(IElement parent) { IInputPortMgr inPortMgr = null; IInputNetworkPort inPort = null; using (PortMgrFactory fac = new PortMgrFactory()) { inPortMgr = fac.CreateInputPortMgr(); } Guid id = Guid.NewGuid(); using (PortFactory fac = new PortFactory()) { inPort = fac.CreateInputNetworkPort(id, parent); } inPortMgr.Add(inPort); return inPortMgr; }