Example #1
0
        public void PBToDTODiTree()
        {
            DiTreeDTO dtoStart = Misc.CreateDiTreeDTO();
            PBDiTree  pb       = dtoStart.ToPBDiTree();
            DiTreeDTO dtoEnd   = pb.ToDiTree();

            Assert.True(dtoStart.CompareTo(dtoEnd) == 0);
        }
Example #2
0
 public static DiTreeDTO ToDiTree(this PBDiTree value)
 {
     //# Tested
     return(new DiTreeDTO(
                value.Root.ToVertex(),
                value.PredecesorMap.ToImmutableDictionary(),
                value.VertexMap.ToVertexMap(),
                value.SuccessorMap.ToImmutableDictionary()
                ));
 }
Example #3
0
        public static PBDiTree ToPBDiTree(this DiTreeDTO value)
        {
            PBDiTree retVal = new PBDiTree();

            retVal.Root = value.Root.ToPBVertex();
            retVal.VertexMap.AddRange(value.VertexMap.ToPBVertices());
            retVal.PredecesorMap.AddRange(value.PredecessorMap.ToPBIntToIntMap());
            retVal.SuccessorMap.AddRange(value.SuccessorMap.ToPBIntToMultipleIntMap());
            return(retVal);
        }