public void OverrideRegistrationTest() { var tm = new TestDataManager(); var newDic = new SqlItemDictionary(); tm.Dictionaries.Register <SqlItemDictionary>(newDic, true); Assert.AreSame(newDic, tm.Sql); }
public void OverrideRegistrationTest() { var tm = new TestDataManager(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); var newDic = new SqlItemDictionary(); tm.Dictionaries.Register <SqlItemDictionary>(newDic, true); Assert.AreSame(newDic, tm.Sql); }
public void RegistrationWithInstanceTest() { var tm = new TestDataManager(); var newDic = new SqlItemDictionary(); tm.Dictionaries.Clear(); tm.Dictionaries.ExtensionMappings.Clear(); tm.Dictionaries.Register <SqlItemDictionary>(newDic); Assert.AreSame(newDic, tm.Sql); }
public void RegistrationWithInstanceTest() { var tm = new TestDataManager(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath); var newDic = new SqlItemDictionary(); tm.Dictionaries.Clear(); tm.Dictionaries.ExtensionMappings.Clear(); tm.Dictionaries.Register <SqlItemDictionary>(newDic); Assert.AreSame(newDic, tm.Sql); }
public void RegistrationWithInstanceAndNoOverrideTest() { var tm = new TestDataManager(); var newDic = new SqlItemDictionary(); void RegisterAction() { tm.Dictionaries.Register <SqlItemDictionary>(newDic); } Assert.Throws <ArgumentException>(RegisterAction, "Dictionary already registered and override is disabled. Dictionary type: .sql"); }