Example #1
0
        public void LocateDialogTypeUnsuccessful(string viewModelFullName)
        {
            // ARRANGE
            Type viewModelType = testAssembly.GetType(viewModelFullName);

            Assert.IsNotNull(viewModelType);

            var viewModel = (INotifyPropertyChanged)Activator.CreateInstance(viewModelType);

            // ASSERT
            Assert.Throws <Exception>(() => NamingConventionDialogTypeLocator.LocateDialogType(viewModel));
        }
Example #2
0
        public void LocateDialogTypeSuccessful(string viewModelFullName, string viewFullName)
        {
            // ARRANGE
            Type viewModelType = testAssembly.GetType(viewModelFullName);

            Assert.IsNotNull(viewModelType);

            var viewModel = (INotifyPropertyChanged)Activator.CreateInstance(viewModelType);

            // ACT
            Type dialogType = NamingConventionDialogTypeLocator.LocateDialogType(viewModel);

            // ASSERT
            Assert.That(dialogType.FullName, Is.EqualTo(viewFullName));
        }