public void CopyAttribute_Of_Ints_For_Nodes(int srcColIndex, int targColIndex, Type[] srcTypes, Type[] targTypes)
        {
            //Arrange
            var copier = new DataAttributeTableCopier();
            IBasicAdjList src = BasicAdjListGenerator.GenerateAdjListWithDataAttribs(3, 0, false, true, false);
            var builder = new DataAttributesBuilder();
            for (int i = 0; i < srcTypes.Length; i++)
            {
                var colIndex = builder.AddColumn((INodeAttributes)src, srcTypes[i]);
                builder.PopulateColRandomly(src.NodeData, colIndex);
            }

            IBasicAdjList targ = BasicAdjListGenerator.GenerateAdjListWithDataAttribs(3, 0, false, true, false);
            for (int i = 0; i < targTypes.Length; i++)
            {
                var colIndex = builder.AddColumn((INodeAttributes)targ, targTypes[i]);
            }
            var map = new Dictionary<INode, INode>();
            for(int i=0; i<src.NodeCount; i++)
            {
                map.Add(targ.Nodes[i], src.Nodes[i]);
            }

            var srcData = src.NodeData.GetColumnData<int>(srcColIndex);
            var targData = targ.NodeData.GetColumnData<int>(targColIndex);
            Assert.NotNull(srcData);
            Assert.NotNull(targData);
            Assert.Equal(srcData.Count, targData.Count);

            //Act
            copier.CopyAttribute(map, src.NodeData, targ.NodeData, srcColIndex, targColIndex);

            //Assert
            srcData = src.NodeData.GetColumnData<int>(srcColIndex);
            targData = targ.NodeData.GetColumnData<int>(targColIndex);
            for (int i = 0; i < srcData.Count; i++)
            {
                Assert.Equal(srcData[i], targData[i]);
            }
        }
        public void CopyAttribute_Throws_If_TargetColIndex_Is_Invalid(int targDataColCount, int targetColIndex)
        {
            //Arrange
            var map = new Dictionary<INode, INode>();
            var copier = new DataAttributeTableCopier();
            var mockSrcNodeData = new Mock<IDataAttributes<INode>>();
            var mockTargNodeData = new Mock<IDataAttributes<INode>>();

            #region set expectations

            mockSrcNodeData.Setup(foo => foo.ColumnCount).Returns(1);
            mockTargNodeData.Setup(foo => foo.ColumnCount).Returns(targDataColCount);

            #endregion

            //Act, Assert
            var ex = Assert.Throws<ArgumentException>(() => copier.CopyAttribute(map, mockSrcNodeData.Object, mockTargNodeData.Object, 0, targetColIndex));
        }
        public void CopyAttribute_Throws_If_DataTypes_Do_Not_Match()
        {
            //Arrange
            var map = new Dictionary<INode, INode>();
            var copier = new DataAttributeTableCopier();
            var mockSrcNodeData = new Mock<IDataAttributes<INode>>();
            var mockTargNodeData = new Mock<IDataAttributes<INode>>();

            #region set expectations

            mockSrcNodeData.Setup(foo => foo.ColumnCount).Returns(0);
            mockSrcNodeData.Setup(foo => foo.DataTypes).Returns(new Type[] { typeof(int) });
            mockTargNodeData.Setup(foo => foo.ColumnCount).Returns(0);
            mockTargNodeData.Setup(foo => foo.DataTypes).Returns(new Type[] { typeof(double) });

            #endregion

            //Act, Assert
            var ex = Assert.Throws<ArgumentException>(() => copier.CopyAttribute(map, mockSrcNodeData.Object, mockTargNodeData.Object, 0, 0));
        }