예제 #1
0
        public void CreateOutputDataPort_Returns_Null_When_Parent_Element_Param_Is_Null()
        {
            //Arrange
            var fac = new PortFactory();

            //Act
            IOutputDataPort port = fac.CreateOutputDataPort(Guid.Empty, null);

            //Assert
            Assert.Null(port);
        }
예제 #2
0
        public void CreateOutputDataPort_Returns_Instance()
        {
            //Arrange
            var fac = new PortFactory();
            Guid id = Guid.NewGuid();
            var mockElement = new Mock<IElement>();

            //Act
            IOutputDataPort port = fac.CreateOutputDataPort(id, mockElement.Object);

            //Assert
            Assert.NotNull(port);
            Assert.Equal(id, port.Id);
            IBackingStore store = (port as OutputDataPort).Store;
            Assert.NotNull(store);
        }