public void TryCreateElement_ReturnType() { var factory = new RuntimeModelDimensionInfoFactory(); var elementInfo = factory.TryGetElementInfo(Mock.Create<IRuntimeElementInfoFactoryDispatcher>(), typeof(ITestDimension).GetTypeInfo()); Assert.IsNotNull(elementInfo); Assert.IsInstanceOf<RuntimeModelDimensionInfo>(elementInfo); }
public void TryCreateElement_Index() { var factory = new RuntimeModelDimensionInfoFactory(); var elementInfo = (IModelDimensionInfo)factory.TryGetElementInfo(Mock.Create<IRuntimeElementInfoFactoryDispatcher>(), typeof(ITestDimensionWithoutSuffix).GetTypeInfo()); Assert.AreEqual(1, elementInfo.Index); }
public void TryCreateElement_DimensionSuffix() { var factory = new RuntimeModelDimensionInfoFactory(); var elementInfo = factory.TryGetElementInfo(Mock.Create<IRuntimeElementInfoFactoryDispatcher>(), typeof(ITestDimension).GetTypeInfo()); Assert.AreEqual("Test", elementInfo.Name); }