public void Should_ignore_write_only() { var obj1 = new Writeonly <int>(); var obj2 = SimpleMapper.Map(obj1, new Class1 <int, int>()); Assert.Equal(0, obj2.P1); }
public static void Mediator() { ChatRoomMediator mediator = new ChatRoomMediator(); Writeonly writeonly = new Writeonly("Bob"); Readonly readonlyp = new Readonly("Bob2"); mediator.Register(writeonly); mediator.Register(readonlyp); mediator.Send("Bob", "Bob2", "Message"); mediator.Send("Bob2", "Bob", "Text message."); }