Example #1
0
        public void DeserializeMarkupXML()
        {
            MarkupXMLFile xmlObj = new MarkupXMLFile(XDocument.Load("markup.xml"));

            //Comments
            Assert.IsTrue(xmlObj.Comments.Count > 0);
            Assert.IsNotNull(xmlObj.Comments[0].Guid);
            Assert.IsNotNull(xmlObj.Comments[0].Topic.ID);
            Assert.IsNotNull(xmlObj.Comments[0].Status);
            Assert.IsNotNull(xmlObj.Comments[0].Date);
            Assert.IsNotNull(xmlObj.Comments[0].Author);
            Assert.IsNotNull(xmlObj.Comments[0].Comment);
            Assert.IsNotNull(xmlObj.Comments[0].ModifiedAuthor);
            Assert.IsNotNull(xmlObj.Comments[0].ModifiedDate);
            Assert.IsNotNull(xmlObj.Comments[0].ReplyToComment.ID);
            Assert.IsNotNull(xmlObj.Comments[0].VerbalStatus);
            Assert.IsNotNull(xmlObj.Comments[0].Viewpoint.ID);
            //Viewpoint
            Assert.IsTrue(xmlObj.Viewpoints.Count > 0);
            Assert.IsNotNull(xmlObj.Viewpoints[0].Snapshot);
            Assert.IsNotNull(xmlObj.Viewpoints[0].Viewpoint);
            Assert.IsNotNull(xmlObj.Viewpoints[0].ID);
            //Header
            Assert.IsNotNull(xmlObj.Header);
            //Files
            Assert.IsTrue(xmlObj.Header.Files.Count > 0);
            Assert.IsNotNull(xmlObj.Header.Files[0].Date);
            Assert.IsNotNull(xmlObj.Header.Files[0].Filename);
            Assert.IsNotNull(xmlObj.Header.Files[0].IfcProject);
            Assert.IsNotNull(xmlObj.Header.Files[0].IfcSpatialStructureElement);
            Assert.IsNotNull(xmlObj.Header.Files[0].isExternal);
            Assert.IsNotNull(xmlObj.Header.Files[0].Reference);
            //Topic
            Assert.IsNotNull(xmlObj.Topic);
            Assert.IsNotNull(xmlObj.Topic.Guid);
            Assert.IsNotNull(xmlObj.Topic.Title);
            Assert.IsNotNull(xmlObj.Topic.AssignedTo);
            Assert.IsNotNull(xmlObj.Topic.BimSnippet);
            Assert.IsNotNull(xmlObj.Topic.BimSnippet.Reference);
            Assert.IsNotNull(xmlObj.Topic.BimSnippet.SnippetType);
            Assert.IsNotNull(xmlObj.Topic.BimSnippet.ReferenceSchema);
            Assert.IsNotNull(xmlObj.Topic.BimSnippet.isExternal);
        }
Example #2
0
 public void DeserializeMarkupXML()
 {
     MarkupXMLFile xmlObj = new MarkupXMLFile(XDocument.Load("markup.xml"));
     //Comments
     Assert.IsTrue(xmlObj.Comments.Count > 0);
     Assert.IsNotNull(xmlObj.Comments[0].Guid);
     Assert.IsNotNull(xmlObj.Comments[0].Topic.ID);
     Assert.IsNotNull(xmlObj.Comments[0].Status);
     Assert.IsNotNull(xmlObj.Comments[0].Date);
     Assert.IsNotNull(xmlObj.Comments[0].Author);
     Assert.IsNotNull(xmlObj.Comments[0].Comment);
     Assert.IsNotNull(xmlObj.Comments[0].ModifiedAuthor);
     Assert.IsNotNull(xmlObj.Comments[0].ModifiedDate);
     Assert.IsNotNull(xmlObj.Comments[0].ReplyToComment.ID);
     Assert.IsNotNull(xmlObj.Comments[0].VerbalStatus);
     Assert.IsNotNull(xmlObj.Comments[0].Viewpoint.ID);
     //Viewpoint
     Assert.IsTrue(xmlObj.Viewpoints.Count > 0);
     Assert.IsNotNull(xmlObj.Viewpoints[0].Snapshot);
     Assert.IsNotNull(xmlObj.Viewpoints[0].Viewpoint);
     Assert.IsNotNull(xmlObj.Viewpoints[0].ID);
     //Header
     Assert.IsNotNull(xmlObj.Header);
     //Files
     Assert.IsTrue(xmlObj.Header.Files.Count > 0);
     Assert.IsNotNull(xmlObj.Header.Files[0].Date);
     Assert.IsNotNull(xmlObj.Header.Files[0].Filename);
     Assert.IsNotNull(xmlObj.Header.Files[0].IfcProject);
     Assert.IsNotNull(xmlObj.Header.Files[0].IfcSpatialStructureElement);
     Assert.IsNotNull(xmlObj.Header.Files[0].isExternal);
     Assert.IsNotNull(xmlObj.Header.Files[0].Reference);
     //Topic
     Assert.IsNotNull(xmlObj.Topic);
     Assert.IsNotNull(xmlObj.Topic.Guid);
     Assert.IsNotNull(xmlObj.Topic.Title);
     Assert.IsNotNull(xmlObj.Topic.AssignedTo);
     Assert.IsNotNull(xmlObj.Topic.BimSnippet);
     Assert.IsNotNull(xmlObj.Topic.BimSnippet.Reference);
     Assert.IsNotNull(xmlObj.Topic.BimSnippet.SnippetType);
     Assert.IsNotNull(xmlObj.Topic.BimSnippet.ReferenceSchema);
     Assert.IsNotNull(xmlObj.Topic.BimSnippet.isExternal);
 }
Example #3
0
        public static MarkupXMLFile BuildMarkupObject()
        {
            MarkupXMLFile xmlObj = new MarkupXMLFile();

            BCFComment comment = new BCFComment(Guid.NewGuid(), Guid.NewGuid(), "testStatus", DateTime.Now, "testAuthor", "testComment");

            comment.ModifiedAuthor = "testModifiedAuthor";
            comment.ModifiedDate   = DateTime.Now;
            comment.ReplyToComment = new AttrIDNode(Guid.NewGuid());
            comment.Viewpoint      = new AttrIDNode(Guid.NewGuid());
            comment.VerbalStatus   = "testVerbalStatus";
            xmlObj.Comments.Add(comment);

            BCFViewpoint viewp = new BCFViewpoint(Guid.NewGuid());

            viewp.Snapshot  = "testSnapshot.png";
            viewp.Viewpoint = "testFilename.bcfv";
            xmlObj.Viewpoints.Add(viewp);

            xmlObj.Header = new BCFHeader();

            BCFFile f = new BCFFile();

            f.Date       = DateTime.Now;
            f.Filename   = "testFilename";
            f.IfcProject = "IfcGuid______________1";
            f.IfcSpatialStructureElement = "IfcGuid______________1";
            f.isExternal = false;
            f.Reference  = "testReference";
            xmlObj.Header.Files.Add(f);

            xmlObj.Topic                            = new BCFTopic(Guid.NewGuid(), "testTitle");
            xmlObj.Topic.AssignedTo                 = "testAssignedTo";
            xmlObj.Topic.BimSnippet                 = new BCFBimSnippet("testSnippetType", "testReference");
            xmlObj.Topic.BimSnippet.isExternal      = true;
            xmlObj.Topic.BimSnippet.ReferenceSchema = "testReferenceSchema";

            return(xmlObj);
        }
Example #4
0
        public static MarkupXMLFile BuildMarkupObject()
        {
            MarkupXMLFile xmlObj = new MarkupXMLFile();

            BCFComment comment = new BCFComment(Guid.NewGuid(), Guid.NewGuid(), "testStatus", DateTime.Now, "testAuthor", "testComment");
            comment.ModifiedAuthor = "testModifiedAuthor";
            comment.ModifiedDate = DateTime.Now;
            comment.ReplyToComment = new AttrIDNode(Guid.NewGuid());
            comment.Viewpoint = new AttrIDNode(Guid.NewGuid());
            comment.VerbalStatus = "testVerbalStatus";
            xmlObj.Comments.Add(comment);

            BCFViewpoint viewp = new BCFViewpoint(Guid.NewGuid());
            viewp.Snapshot = "testSnapshot.png";
            viewp.Viewpoint = "testFilename.bcfv";
            xmlObj.Viewpoints.Add(viewp);

            xmlObj.Header = new BCFHeader();

            BCFFile f = new BCFFile();
            f.Date = DateTime.Now;
            f.Filename = "testFilename";
            f.IfcProject = "IfcGuid______________1";
            f.IfcSpatialStructureElement = "IfcGuid______________1";
            f.isExternal = false;
            f.Reference = "testReference";
            xmlObj.Header.Files.Add(f);

            xmlObj.Topic = new BCFTopic(Guid.NewGuid(), "testTitle");
            xmlObj.Topic.AssignedTo = "testAssignedTo";
            xmlObj.Topic.BimSnippet = new BCFBimSnippet("testSnippetType", "testReference");
            xmlObj.Topic.BimSnippet.isExternal = true;
            xmlObj.Topic.BimSnippet.ReferenceSchema = "testReferenceSchema";

            return xmlObj;
        }