示例#1
0
        public void SubscribesStream(User user)
        {
            var sut = new ReactiveViewModel <User, string>(user.Id);

            sut.MonitorEvents();

            Connect(user.Id).Emit(user);

            sut.Model.Should().BeSameAs(user);
            sut.ShouldRaisePropertyChangeFor(x => x.Model);
        }
示例#2
0
        public void ModelSetterRaisesEventWithModelChangedEventArgs(User user)
        {
            var sut = new ReactiveViewModel <User, string>(user.Id);

            sut.MonitorEvents();

            Connect(user.Id).Emit(user);

            sut.ShouldRaisePropertyChangeFor(x => x.Model)
            .WithArgs <PropertyChangedEventArgs>(args => ReferenceEquals(
                                                     args, ReactiveViewModel.ModelChangedEventArgs));
        }