public void TestGetNextDocument() { var archive = ThreeDXMLFile.Create(_stream); var document = archive.GetNextDocument("wheel.3drep"); Assert.IsInstanceOfType(document, typeof(XDocument)); }
public void TestListOfFiles() { var archive = ThreeDXMLFile.Create(_stream); var fileList = archive.ContainedFiles; Assert.AreEqual(17, fileList.Count); Assert.IsTrue(fileList.Contains("manifest.xml")); Assert.IsTrue(fileList.Contains("quad.3dxml")); Assert.IsTrue(fileList.Contains("wheel.3drep")); }
public IModel Parse(Stream stream) { var fileArchive = ThreeDXMLFile.Create(stream); var xmlManifest = ReadManifest(fileArchive); // create 3dxml model and fill it with data var internalModel = new ThreeDXMLImplementation(ParseUtility.GetHeader(xmlManifest)) { ReferenceReps = ParseAssetRepresentation(xmlManifest, fileArchive), ThreeDReferences = ParseReference3D(xmlManifest), ThreeDInstances = ParseInstance3D(xmlManifest), InstanceReps = ParseInstanceRep(xmlManifest) }; // return the model definition return(internalModel.ToModel()); }
public void TestFailGetNextDocument() { var archive = ThreeDXMLFile.Create(_stream); archive.GetNextDocument("error.3drep"); }
public void TestGetManifest() { var archive = ThreeDXMLFile.Create(_stream); var manifest = archive.GetManifest(); }
public void TestCreation() { var archive = ThreeDXMLFile.Create(_stream); Assert.IsInstanceOfType(archive, typeof(IThreeDXMLArchive)); }