Ejemplo n.º 1
0
        public void Import_ObjAscii_ModelContentShouldBeEqualToExpected(TestFile testFile)
        {
            testFile.DecrementModelFaceIndexes(); // Hack. Was too lazy to reindex all the test file faces to 0 based.
            var resModel = FileConverter3D.Import.ObjAscii(GetTestFilePath(testFile.FileName));

            Assert.Multiple(() =>
            {
                Assert.That(resModel.Vertices, Is.EquivalentTo(testFile.ExpectedModel.Vertices), testFile.FileName);
                Assert.That(resModel.Normals, Is.EquivalentTo(testFile.ExpectedModel.Normals), testFile.FileName);
                Assert.That(resModel.TextureCoords, Is.EquivalentTo(testFile.ExpectedModel.TextureCoords), testFile.FileName);
                Assert.That(resModel.Faces, Is.EquivalentTo(testFile.ExpectedModel.Faces), testFile.FileName);
            });
        }