public void PropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var vm     = new NotificationViewModel("", NotificationType.Information, true);
            var tester = new PropertyChangedTester(vm);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var obj    = new ItemSelection <string>("test");
            var tester = new PropertyChangedTester(obj);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var vm     = new TextInputDialogViewModel();
            var tester = new PropertyChangedTester(vm);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #4
0
        public void PropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var vm     = new ColumnConfigurationViewModel(new ColumnDefinition(ColumnType.Activity));
            var tester = new PropertyChangedTester(vm);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #5
0
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var vm     = new MuteEditViewModel(MuteEditAction.Add);
            var tester = new PropertyChangedTester(vm);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #6
0
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var obj    = new MuteEntry();
            var tester = new PropertyChangedTester(obj);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #7
0
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var wizard = new Mock <IWizardViewModel>();
            var obj    = new FinishPage(wizard.Object);
            var tester = new PropertyChangedTester(obj);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            Func <Task <IEnumerable <object> > > loadAction = () => Task.FromResult(Enumerable.Empty <object>());
            var page   = new UserSubPage("", loadAction, 0);
            var tester = new PropertyChangedTester(page);

            // Act
            tester.Test(nameof(UserSubPage.Dispatcher));

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var vm           = new RetweetDialogViewModel();
            var typeResolver = new Mock <ITypeResolver>();

            typeResolver.Setup(t => t.Resolve(typeof(StatusViewModel))).Returns(new StatusViewModel(DummyGenerator.CreateDummyStatus(), null, null, null));
            var tester = new PropertyChangedTester(vm, false, typeResolver.Object);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #10
0
        public void PropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var vm       = CreateVm();
            var resolver = new Mock <ITypeResolver>();

            resolver.Setup(c => c.Resolve(typeof(WizardPageViewModel))).Returns(new Mock <WizardPageViewModel>(null).Object);
            var tester = new PropertyChangedTester(vm, true, resolver.Object);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #11
0
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var typeResolver = new Mock <ITypeResolver>();

            typeResolver.Setup(t => t.Resolve(typeof(UserViewModel))).Returns(new UserViewModel(DummyGenerator.CreateDummyUser()));

            var vm     = new ProfileDialogViewModel();
            var tester = new PropertyChangedTester(vm, false, typeResolver.Object);

            // Act
            tester.Test(nameof(ProfileDialogViewModel.Notifier));

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var resolver = new Mock <ITypeResolver>();

            resolver.Setup(r => r.Resolve(typeof(ImageEntry))).Returns(new ImageEntry(new Uri("http://example.com"), false));

            var vm     = new ImageDialogViewModel();
            var tester = new PropertyChangedTester(vm, false, resolver.Object);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #13
0
        public void PropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var cfg = new Mock <IConfig>();

            cfg.SetupGet(c => c.General).Returns(new GeneralConfig());
            var lng    = new Mock <ILanguageProvider>();
            var vm     = new GeneralSettings(cfg.Object, lng.Object);
            var tester = new PropertyChangedTester(vm);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var resolver = new Mock <ITypeResolver>();
            var context  = new Mock <IContextEntry>();

            resolver.Setup(r => r.Resolve(typeof(MessageViewModel)))
            .Returns(new MessageViewModel(DummyGenerator.CreateDummyMessage(), context.Object, null, null));

            var vm     = new ComposeMessageViewModel();
            var tester = new PropertyChangedTester(vm, false, resolver.Object);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var context    = new Mock <IContextEntry>();
            var definition = new ColumnDefinition(ColumnType.User);
            var config     = new Mock <IConfig>();

            config.SetupGet(c => c.General).Returns(new GeneralConfig());
            var parser = new Mock <IStreamParser>();

            var vm     = new TestColumn(context.Object, definition, config.Object, parser.Object);
            var tester = new PropertyChangedTester(vm, true);

            // Act
            tester.Test(nameof(ColumnViewModelBase.Muter), nameof(ColumnViewModelBase.Cache));

            // Assert
            tester.Verify();
        }
Exemple #16
0
        public void PropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var status       = DummyGenerator.CreateDummyStatus();
            var typeResolver = new Mock <ITypeResolver>();

            typeResolver.Setup(t => t.Resolve(typeof(StatusViewModel))).Returns(new StatusViewModel(status, null, null,
                                                                                                    null));

            var obj = new ComposeTweetViewModel(null)
            {
                TwitterConfig = MockTwitterConfig()
            };
            var tester = new PropertyChangedTester(obj, false, typeResolver.Object);

            // Act
            tester.Test();

            // Assert
            tester.Verify();
        }
Exemple #17
0
        public void NotifyPropertyChangedIsImplementedCorrectly()
        {
            // Arrange
            var context    = new Mock <IContextEntry>();
            var definition = new ColumnDefinition(ColumnType.User);
            var config     = new Mock <IConfig>();

            config.SetupGet(c => c.General).Returns(new GeneralConfig());
            var parser = new Mock <IStreamParser>();

            var vm     = new TestColumn(context.Object, definition, config.Object, parser.Object);
            var tester = new PropertyChangedTester(vm, true, new NinjectTypeResolver());

            // Act
            tester.Test(nameof(ColumnViewModelBase.Muter), nameof(ColumnViewModelBase.ContextList),
                        nameof(ColumnViewModelBase.ViewServiceRepository),
                        nameof(ColumnViewModelBase.Cache), nameof(ColumnViewModelBase.Configuration),
                        nameof(ColumnViewModelBase.Dispatcher),
                        nameof(ColumnViewModelBase.ProcessStarter), nameof(ColumnViewModelBase.TwitterConfig));

            // Assert
            tester.Verify();
        }