public void GetModel11() { HierarchyModel model = new HierarchyModel(new CobolModel("Class", "CLASS001"), new IModel[] { new CobolModel("Property", "PROP001"), }); Assert.That(model.GetModel("1"), Is.EqualTo(model.Model)); Assert.That(model.GetModel("1.0"), Is.EqualTo(null)); Assert.That(model.GetModel("1.1"), Is.EqualTo(model.ChildModels[0])); Assert.That(model.GetModel("1.2"), Is.EqualTo(null)); }
public void GetModel1() { HierarchyModel model = new HierarchyModel(new CobolModel("Class", "CLASS001")); IModel result = model.GetModel("1"); Assert.That(result, Is.EqualTo(model.Model)); Assert.That(model.GetModel("1.1"), Is.EqualTo(null)); Assert.That(model.GetModel("1.2"), Is.EqualTo(null)); }
public void GetModel11() { HierarchyModel model = new HierarchyModel(new CobolModel("Class", "CLASS001"), new IModel[] { new CobolModel("Property", "PROP001"), }); Assert.That(model.GetModel("1"), Is.EqualTo(model.Model)); Assert.That(model.GetModel("1.0"), Is.EqualTo(null)); Assert.That(model.GetModel("1.1"), Is.EqualTo(model.ChildModels[0])); Assert.That(model.GetModel("1.2"), Is.EqualTo(null)); }
public void GetModel1() { HierarchyModel model = new HierarchyModel(new CobolModel("Class", "CLASS001")); IModel result = model.GetModel("1"); Assert.That(result, Is.EqualTo(model.Model)); Assert.That(model.GetModel("1.1"), Is.EqualTo(null)); Assert.That(model.GetModel("1.2"), Is.EqualTo(null)); }
public void GetModel121() { HierarchyModel model = new HierarchyModel(new CobolModel("Class", "CLASS001"), new IModel[] { new HierarchyModel(new CobolModel("Property", "PROP001"), new IModel[] { new CobolModel("DataType", "DATA001"), }), new CobolModel("Property", "PROP002"), }); Assert.That(model.GetModel("1"), Is.EqualTo(model.Model)); Assert.That(model.GetModel("1.0"), Is.EqualTo(null)); Assert.That(model.GetModel("1.1"), Is.EqualTo(((HierarchyModel) model.ChildModels[0]).Model)); Assert.That(model.GetModel("1.1.1"), Is.EqualTo(((HierarchyModel)model.ChildModels[0]).ChildModels[0])); Assert.That(model.GetModel("1.1.2"), Is.EqualTo(null)); Assert.That(model.GetModel("1.2"), Is.EqualTo(model.ChildModels[1])); Assert.That(model.GetModel("1.2.2"), Is.EqualTo(null)); Assert.That(model.GetModel("1.3"), Is.Null); Assert.That(model.GetModel("2.1"), Is.Null); }
public void GetModel121() { HierarchyModel model = new HierarchyModel(new CobolModel("Class", "CLASS001"), new IModel[] { new HierarchyModel(new CobolModel("Property", "PROP001"), new IModel[] { new CobolModel("DataType", "DATA001"), }), new CobolModel("Property", "PROP002"), }); Assert.That(model.GetModel("1"), Is.EqualTo(model.Model)); Assert.That(model.GetModel("1.0"), Is.EqualTo(null)); Assert.That(model.GetModel("1.1"), Is.EqualTo(((HierarchyModel)model.ChildModels[0]).Model)); Assert.That(model.GetModel("1.1.1"), Is.EqualTo(((HierarchyModel)model.ChildModels[0]).ChildModels[0])); Assert.That(model.GetModel("1.1.2"), Is.EqualTo(null)); Assert.That(model.GetModel("1.2"), Is.EqualTo(model.ChildModels[1])); Assert.That(model.GetModel("1.2.2"), Is.EqualTo(null)); Assert.That(model.GetModel("1.3"), Is.Null); Assert.That(model.GetModel("2.1"), Is.Null); }