Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void AddMergedDictionary_WontThrow_WhenNoResDictSpecified()
        {
            var loader = new Fake_Loader();

            loader.AddMergedDictionary(null);

            // Implicit assert -- when at this point, then AddMergedDictionary() didn't throw
        }
Beispiel #3
0
        public void AddMergedDictionary_WontThrow_WhenNoResDictSpecified()
        {
            var loader = new Fake_Loader();

            loader.AddMergedDictionary(null);

            // Implicit assert -- when at this point, then AddMergedDictionary() didn't throw
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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);
        }
Beispiel #6
0
        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);
        }