public void ShouldFailOnNullValueCreateTest() { DynamicValueTokenReplacementStrategy tokenReplacementStrategy; Func <string[], object> value; value = null; tokenReplacementStrategy = new DynamicValueTokenReplacementStrategy(value); }
public void ShouldFailOnNullValueCreateTest() { DynamicValueTokenReplacementStrategy tokenReplacementStrategy; Func <string[], object> value; value = null; // TODO - MOCK THIS IDataTypeFascade mockDataTypeFascade = new DataTypeFascade(); IReflectionFascade mockReflectionFascade = new ReflectionFascade(mockDataTypeFascade); tokenReplacementStrategy = new DynamicValueTokenReplacementStrategy(mockDataTypeFascade, mockReflectionFascade, value); }
public void ShouldCreateAndEvaluateTest() { DynamicValueTokenReplacementStrategy tokenReplacementStrategy; Func <string[], object> value; object result; value = p => int.Parse(p[0]) + 1; tokenReplacementStrategy = new DynamicValueTokenReplacementStrategy(value); Assert.IsNotNull(tokenReplacementStrategy); Assert.IsNotNull(tokenReplacementStrategy.Method); result = tokenReplacementStrategy.Evaluate(new string[] { "10" }); Assert.IsNotNull(result); Assert.AreEqual(11, result); }
public void ShouldCreateAndEvaluateTest() { DynamicValueTokenReplacementStrategy tokenReplacementStrategy; Func <string[], object> value; object result; value = p => int.Parse(p[0]) + 1; // TODO - MOCK THIS IDataTypeFascade mockDataTypeFascade = new DataTypeFascade(); IReflectionFascade mockReflectionFascade = new ReflectionFascade(mockDataTypeFascade); tokenReplacementStrategy = new DynamicValueTokenReplacementStrategy(mockDataTypeFascade, mockReflectionFascade, value); Assert.IsNotNull(tokenReplacementStrategy); Assert.IsNotNull(tokenReplacementStrategy.Method); result = tokenReplacementStrategy.Evaluate(new string[] { "10" }); Assert.IsNotNull(result); Assert.AreEqual(11, result); }