コード例 #1
0
        public void GivenCorrectDateWhenWeTryToGetUrlThenWeShouldGetAValidUrl()
        {
            var serviceWrapper = new ServiceWrapper();

            var result = serviceWrapper.GetUrl("020102");

            Assert.AreEqual("http://www.nbp.pl/kursy/xml/a001z020102.xml", result);
        }
コード例 #2
0
        public void GivenInCorrectDateWhenWeTryToGeUrlThenExceptonShouldBeThrown()
        {
            var serviceWrapper = new ServiceWrapper();

            Assert.Throws<DocumentNotFoundException>(() => serviceWrapper.GetUrl("020105"));
        }