public void Dependencies_not_null() { var dialogModel = new AboutDialogModel(); Assert.NotNull(dialogModel.Dependencies); }
private AboutDialogModel CreateAboutDialogModel(IViewModel?parent = null) { var assembly = Assembly.GetEntryAssembly(); var assemblyName = assembly.GetName(); var description = assembly.GetCustomAttribute <AssemblyDescriptionAttribute>(); var copyright = assembly.GetCustomAttribute <AssemblyCopyrightAttribute>(); var publisher = assembly.GetCustomAttribute <AssemblyCompanyAttribute>(); var viewModel = new AboutDialogModel { Parent = parent, Title = Strings.About, Name = assemblyName.Name, Description = description?.Description, Version = assemblyName.Version, Copyright = copyright?.Copyright, AdditionalNotes = "", Uri = new Uri("https://github.com/nkristek/Stein"), Publisher = publisher?.Company, OpenUriCommand = new OpenUriCommand(_uriService) }; viewModel.Dependencies.Add(new DependencyViewModel { Name = "Smaragd", Uri = new Uri("https://github.com/nkristek/Smaragd"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "Wpf.Converters", Uri = new Uri("https://github.com/nkristek/Wpf.Converters"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "AdonisUI", Uri = new Uri("https://github.com/benruehl/adonis-ui"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "log4net", Uri = new Uri("http://logging.apache.org/log4net/"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "Newtonsoft.Json", Uri = new Uri("https://www.newtonsoft.com/json"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "Ninject", Uri = new Uri("https://github.com/ninject/Ninject"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "Windows-API-Code-Pack", Uri = new Uri("https://github.com/aybe/Windows-API-Code-Pack-1.1"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "Wix Toolset", Uri = new Uri("http://wixtoolset.org/"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.Dependencies.Add(new DependencyViewModel { Name = "System.Windows.Interactivity.WPF", Uri = new Uri("https://www.microsoft.com/en-us/download/details.aspx?id=10801"), OpenUriCommand = new Commands.DependencyViewModelCommands.OpenUriCommand(_uriService), IsDirty = false }); viewModel.IsReadOnly = true; viewModel.IsDirty = false; return(viewModel); }
public void Publisher_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.Publisher, "test"); }
public void OpenUriCommand_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.OpenUriCommand, new TestCommand(), PropertyTestSettings.IsDirtyIgnored | PropertyTestSettings.IsReadOnlyIgnored); }
public void AdditionalNotes_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.AdditionalNotes, "test"); }
public void Uri_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.Uri, new Uri("http://www.example.com")); }
public void Copyright_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.Copyright, "test"); }
public void Version_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.Version, new Version(1, 2, 3, 4)); }
public void Description_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.Description, "test"); }
public void Name_property() { var dialogModel = new AboutDialogModel(); dialogModel.TestProperty(() => dialogModel.Name, "test"); }
public About() { InitializeComponent(); aboutDialogModel = new AboutDialogModel(); DataContext = aboutDialogModel; }