Exemplo n.º 1
0
        public void Resolve_SymbolMacro_ReplacedCorrectly()
        {
            var resolver = new StockMacroResolver(new Stock {
                Symbol = "JNJ"
            });

            var result = resolver.Resolve(new Request("http://www.server.com/search?id=${symbol}&paging=off"));

            Assert.That(result.UrlString, Is.EqualTo("http://www.server.com/search?id=JNJ&paging=off"));
        }
Exemplo n.º 2
0
        public void Resolve_WpknMacro_ReplacedCorrectly()
        {
            var resolver = new StockMacroResolver(new Stock {
                Wpkn = "AB0976D"
            });

            var result = resolver.Resolve(new Request("http://www.server.com/search?id=${wpkn}&paging=off"));

            Assert.That(result.UrlString, Is.EqualTo("http://www.server.com/search?id=AB0976D&paging=off"));
        }