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)); }
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)); }