public void SetUp()
 {
     this._Writer = new VNABasicAdjListWriter();
 }
 public void SetParam_ForNodeMapIndex(int delimiter)
 {
     VNABasicAdjListWriter writer = new VNABasicAdjListWriter();
     writer.SetParam(VNABasicAdjListWriter._ParamName_NodeIdentifierAttributeIndex, delimiter);
     Assert.Equal(delimiter, writer.NodeIdentifierAttributeIndex);
 }
        public void SetParam_ForInputNetwork()
        {
            var mockNet = new Mock<IBasicAdjList>();

            var writer = new VNABasicAdjListWriter();
            writer.SetParam(VNABasicAdjListWriter._ParamName_InputNetwork, mockNet.Object);
            Assert.Same(mockNet.Object, writer.InputNetwork);
        }
 public void SetParam_ForFileName(string fileName)
 {
     VNABasicAdjListWriter writer = new VNABasicAdjListWriter();
     writer.SetParam(VNABasicAdjListWriter._ParamName_FileName, fileName);
     Assert.Equal(fileName, writer.FileName);
 }
 public void SetParam_ForExportNodeAttributes(bool exportHeaders)
 {
     VNABasicAdjListWriter writer = new VNABasicAdjListWriter();
     writer.SetParam(VNABasicAdjListWriter._ParamName_ExportNodeAttributes, exportHeaders);
     Assert.Equal(exportHeaders, writer.ExportNodeAttributes);
 }
        public void SetParams(string fileName, int nodeMapIndex, int edgeMapIndex, bool exportHeaders, bool exportRowKeys)
        {
            var mockNet = new Mock<IBasicAdjList>();
            var paramDic = new Dictionary<string, object>();

            paramDic.Add(VNABasicAdjListWriter._ParamName_FileName, fileName);
            paramDic.Add(VNABasicAdjListWriter._ParamName_InputNetwork, mockNet.Object);
            paramDic.Add(VNABasicAdjListWriter._ParamName_NodeIdentifierAttributeIndex, nodeMapIndex);
            paramDic.Add(VNABasicAdjListWriter._ParamName_EdgeIdentifierAttributeIndex, edgeMapIndex);
            paramDic.Add(VNABasicAdjListWriter._ParamName_ExportNodeAttributes, exportHeaders);
            paramDic.Add(VNABasicAdjListWriter._ParamName_ExportEdgeAttributes, exportRowKeys);

            VNABasicAdjListWriter writer = new VNABasicAdjListWriter();
            writer.SetParams(paramDic);

            Assert.Equal(fileName, writer.FileName);
            Assert.Same( mockNet.Object, writer.InputNetwork);
            Assert.Equal(exportHeaders, writer.ExportNodeAttributes);
            Assert.Equal(exportRowKeys, writer.ExportEdgeAttributes);
            Assert.Equal(nodeMapIndex, writer.NodeIdentifierAttributeIndex);
            Assert.Equal(edgeMapIndex, writer.EdgeIdentifierAttributeIndex);
        }