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