public void TryCreateModelElement_Success_no_ending() { var constructor = new ModelDimensionElementConstructor(); var context = this.GetConstructionContext(); var dimElement = constructor.TryCreateModelElement(context, typeof(ISecondTestDim).AsRuntimeTypeInfo()); Assert.AreEqual("Second", dimElement.Name); }
public void TryCreateModelElement_Success_no_dimension_name_in_namespace() { var constructor = new ModelDimensionElementConstructor(); var context = this.GetConstructionContext(); var dimElement = constructor.TryCreateModelElement(context, typeof(INoDimTestDimDimensionElement).AsRuntimeTypeInfo()); Assert.AreEqual("NoDimTestDim", dimElement.Name); }
public void TryCreateModelElement_success() { var constructor = new ModelDimensionElementConstructor(); var context = this.GetConstructionContext(); var dimElement = constructor.TryCreateModelElement(context, typeof(IFirstTestDimDimensionElement).AsRuntimeTypeInfo()); Assert.IsNotNull(dimElement); Assert.IsInstanceOf<ModelDimensionElement>(dimElement); var dimensionElement = (ModelDimensionElement)dimElement; Assert.AreEqual("First", dimElement.Name); Assert.AreEqual(":First", dimElement.QualifiedName); Assert.AreEqual("TestDim", dimensionElement.DimensionName); }