public void SubstituteShouldReturnAReplacedStringAccordingToParamsWhen() { var func = new Substitute(); var result = func.Execute(FunctionsHelper.CreateArgs("testar testar", "es", "xx"), _parsingContext); Assert.AreEqual("txxtar txxtar", result.Result); }
public void SubstituteShouldReplaceOnlySecondInstance() { var func = new Substitute(); var result = func.Execute(FunctionsHelper.CreateArgs("testar testar", "es", "xx", 2), _parsingContext); Assert.AreEqual("testar txxtar", result.Result); }
public void SubstituteWithInvalidArgumentReturnsPoundValue() { var func = new Substitute(); var args = FunctionsHelper.CreateArgs(); var result = func.Execute(args, this.ParsingContext); Assert.AreEqual(eErrorType.Value, ((ExcelErrorValue)result.Result).Type); }