public void IsNamedValueShouldReturnTrueIfKeyIsANamedValue() { var dict = new Dictionary<string, object>(); dict.Add("A", "B"); _excelDataProvider.Stub(x => x.GetWorkbookNameValues()) .Return(dict); var nameValueProvider = new NameValueProvider(_excelDataProvider); var result = nameValueProvider.IsNamedValue("A"); Assert.IsTrue(result); }
public void ReloadShouldReloadDataFromExcelDataProvider() { var dict = new Dictionary<string, object>(); dict.Add("A", "B"); _excelDataProvider.Stub(x => x.GetWorkbookNameValues()) .Return(dict); var nameValueProvider = new NameValueProvider(_excelDataProvider); var result = nameValueProvider.GetNamedValue("A"); Assert.AreEqual("B", result); dict.Clear(); nameValueProvider.Reload(); Assert.IsFalse(nameValueProvider.IsNamedValue("A")); }