public static void LoadDailyRates(Action <string, decimal, DateTime> addRate, bool readFromEcb = false) { var s = IsRunning.Tests(readFromEcb) ? example : WebService.Load(dailyUrl); ReadXml(s, DateTime.MinValue, addRate); }
public static void LoadRatesHistory(Action <string, decimal, DateTime> addRate, bool readFromEcb = false, DateTime?toDate = null) { var date = toDate ?? DateTime.MinValue; var isTesting = IsRunning.Tests(readFromEcb); var s = isTesting ? example : WebService.Load(historyUrl); ReadXml(s, date, addRate); }
[TestMethod] public void TestsTest() { Assert.IsTrue(IsRunning.Tests()); Assert.IsFalse(IsRunning.Tests(true)); }