public void TestRelativeFileWithRepeatingTitleParameter() { const string resource = @"shorthand.xml?mode=init&title=hello%20world&title=no"; var expected = new Dictionary<string, string> { { "mode", "init" }, { "title", "hello world,no" } }; var actual = new FileReader().Read(resource, new TraceLogger()).Parameters; Assert.AreEqual(expected, actual); }
public void TestFileWithInvalidQueryString() { const string resource = @"shorthand.xml?mode="; var expected = new Dictionary<string, string> { { "mode", string.Empty }}; var actual = new FileReader().Read(resource, new TraceLogger()).Parameters; Assert.AreEqual(expected, actual); }
public void TestAbsoluteFile() { const string resource = @"C:\Code\Cfg.Net\Cfg.Test\shorthand.xml?mode=init&title=hello%20world"; var expected = new Dictionary<string,string> { {"mode","init"}, {"title","hello world"}}; var actual = new FileReader().Read(resource, new TraceLogger()).Parameters; Assert.AreEqual(expected, actual); }