public void AddMergedDictionary_WillCreateApplicationObject_WhenNoApplicationObjectExistsYet() { var loader = new Fake_Loader(); loader.AddMergedDictionary("pack://application:,,,/Cider-x64.UnitTests;component/DummyResourceDictionary.xaml"); Assert.IsTrue(Application.Current != null); }
public void AddMergedDictionary_WontThrow_WhenNoResDictSpecified() { var loader = new Fake_Loader(); loader.AddMergedDictionary(null); // Implicit assert -- when at this point, then AddMergedDictionary() didn't throw }
public void AddMergedDictionary_WillAddResDictToCollection_WhenResDictSpecified() { var loader = new Fake_Loader(); loader.AddMergedDictionary("pack://application:,,,/Cider-x64.UnitTests;component/DummyResourceDictionary.xaml"); var resDictEnumerator = Application.Current.Resources.MergedDictionaries.GetEnumerator(); resDictEnumerator.MoveNext(); Assert.AreEqual(new Uri("pack://application:,,,/Cider-x64.UnitTests;component/DummyResourceDictionary.xaml"), resDictEnumerator.Current.Source); }