Url from variable test added
This commit is contained in:
parent
bed6302ea8
commit
b5e7aceaa6
|
@ -1476,6 +1476,17 @@ Odd
|
||||||
Assert.AreEqual(expected, actual, "Value field didn't work");
|
Assert.AreEqual(expected, actual, "Value field didn't work");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void TestCompile_UrlEncodeParam() {
|
||||||
|
FormatCompiler compiler = new FormatCompiler();
|
||||||
|
const string format = @"{{#urlencode}}{{url}}{{/urlencode}}";
|
||||||
|
Generator generator = compiler.Compile(format);
|
||||||
|
|
||||||
|
string actual = generator.Render(new {url="https://google.com" });
|
||||||
|
string expected = "https%3a%2f%2fgoogle.com";
|
||||||
|
Assert.AreEqual(expected, actual, "Value field didn't work");
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void TestCompile_UrlDecode() {
|
public void TestCompile_UrlDecode() {
|
||||||
FormatCompiler compiler = new FormatCompiler();
|
FormatCompiler compiler = new FormatCompiler();
|
||||||
|
|
Loading…
Reference in New Issue