public void ProcessTextCoord_ThrowsWhenSubmeshCollecionIsEmpty()
        {
            Mesh             mesh   = new Mesh();
            ObjParsingWorker worker = new ObjParsingWorker();

            Assert.That(() => worker.ProcessTextCoord(string.Empty, mesh), Throws.InvalidOperationException);
        }
        public void ProcessTextCoord_ShouldReturnWhereThereIsInvalidNumberOfTokens(string line)
        {
            Mesh mesh = new Mesh();

            mesh.SubMeshes.Add(new SubMesh());
            ObjParsingWorker worker = new ObjParsingWorker();

            worker.ProcessTextCoord(line, mesh);

            Assert.That(mesh.SubMeshes.Last().Textures, Is.Empty);
        }
        public void ProcessTextCoord_ShouldAddTextureToTheLastSubmesh()
        {
            Mesh mesh = new Mesh();

            mesh.SubMeshes.Add(new SubMesh());
            mesh.SubMeshes.Add(new SubMesh());

            float            x      = 1.000000f;
            float            y      = 1.000000f;
            string           line   = $"t {x} {y}";
            ObjParsingWorker worker = new ObjParsingWorker();

            worker.ProcessTextCoord(line, mesh);

            Vector3 lastTexture = mesh.SubMeshes.Last().Textures.First();

            Assert.That(lastTexture.X, Is.EqualTo(x));
            Assert.That(lastTexture.Y, Is.EqualTo(y));
        }