Ejemplo n.º 1
0
        public void ThrowsWhenProcessIdIsNotDefined()
        {
            string unknownProcessId = _fixture.Create<string>();
            Mesh mesh = new Mesh();

            ParsingService service = new ParsingService();

            Assert.That(() => service.ProcessLine(unknownProcessId, mesh), Throws.InvalidOperationException);
        }
Ejemplo n.º 2
0
        public void CanInitializeProcessDictionary()
        {
            ParsingService service = new ParsingService();

            foreach (KeyValuePair<string, Action<string, Mesh>> pair in service.ProcessDictionary)
            {
                Assert.That(_processIds.Contains(pair.Key), Is.True);
                Assert.That(pair.Value, Is.Not.Null);
            }
        }
Ejemplo n.º 3
0
        public void ReturnWhenLineIsEmpty(string line)
        {
            Mesh mesh = new Mesh();

            ParsingService service = new ParsingService();
            service.ProcessLine(line, mesh);
            
            Mesh emptyMesh = new Mesh();
            Assert.That(mesh.MinVertex, Is.EqualTo(emptyMesh.MinVertex));
            Assert.That(mesh.MaxVertex, Is.EqualTo(emptyMesh.MaxVertex));
            Assert.That(mesh.Filename, Is.Null);
            Assert.That(mesh.SubMeshes, Is.Empty);
        }