public void Matches()
        {
            IImpliedModelParser modelParser = new TestParser();
            IModel model = new CobolModel("Parent", "NAME SHOULD SEPARATE TEST DATA", "This is test data");

            Assert.That(modelParser.Matches(model), Is.True);
        }
示例#2
0
        public void SingleTestParser()
        {
            IImpliedModelParser modelParser = new TestParser();
            IModel model = new CobolModel("Parent", "NAME SHOULD SEPARATE TEST DATA 1", "This is test data");

            Assert.That(modelParser.Matches(model), Is.True);

            IModel child = modelParser.Parse(model);

            Assert.That(child, Is.Not.Null);
            Assert.That(child, Is.Not.SameAs(model));

            IModel expected = new HierarchyModel(new CobolModel("Parent", "NAME SHOULD SEPARATE", "This is test data"), new IModel[]
            {
                new CobolModel("Test", "TEST DATA 1", "Implied")
            });

            AssertModelIsSame(child, expected, true);
        }