Exemplo n.º 1
0
        public void ShouldThrowExceptionIfNumberOfArgumentsIsWrong(string given)
        {
            Assert.Throws <FormatException>(() => StringToExpressionConverter.Convert <string, string>(given),
                                            "Provided number of arguments: 2 is wrong. Expected 3 arguments.");

            Assert.Throws <FormatException>(() => StringToExpressionConverter.Convert <string, string, string, string>(given),
                                            "Provided number of arguments: 4 is wrong. Expected 3 arguments.");
        }
Exemplo n.º 2
0
 public string ShouldFormatStringCorrectly(string given)
 {
     return(StringToExpressionConverter.Convert(given).Compile().Invoke());
 }
Exemplo n.º 3
0
 public void ShouldThrowExceptionIfPlaceholderOrderIsWrong(string given)
 {
     Assert.Throws <FormatException>(() => StringToExpressionConverter.Convert <string, string, string>(given));
 }
Exemplo n.º 4
0
 public string ShouldFormatStringCorrectly(string given, object arg0, object arg1, object arg2)
 {
     return(StringToExpressionConverter.Convert <object, object, object>(given).Compile().Invoke(arg0, arg1, arg2));
 }