コード例 #1
0
        public void GetXMLTest()
        {
            XmlDocument emptyXML = new XmlDocument();
            string      url      = "http://rates.fxcm.com/RatesXML";

            Assert.AreNotEqual(emptyXML, CurrencyRateRetriever.RetrieveXml(url));
        }
コード例 #2
0
        public void CountAllPairs()
        {
            string url       = "http://rates.fxcm.com/RatesXML";
            int    pairCount = 0;

            pairCount = XMLParser.ParseCurrencyXML(CurrencyRateRetriever.RetrieveXml(url)).Count;
            //There are 61 pairs in the document
            Assert.AreEqual(61, pairCount);
        }