public void changes_to_the_commentary_property_raise_the_property_changed_event() { var model = new MessageModel(); var observer = model.CreateObserver(); model.Process(new AddCommentaryMessage("commentary")); Assert.True(observer.HasChanged(x => x.Commentary)); }
public void changes_to_the_system_property_raise_the_property_changed_event() { var model = new MessageModel(); var observer = model.CreateObserver(); model.Process(new SetSystemMessageMessage("message")); Assert.True(observer.HasChanged(x => x.System)); }
public void process_throws_when_message_is_null() { var model = new MessageModel(); Assert.Throws<ArgumentNullException>(() => model.Process(null)); }
private static MessageModel CreateModel(params Message[] messagesToProcess) { var model = new MessageModel(); foreach(var message in messagesToProcess) { model.Process(message); } return model; }