public void CanMapRegisterOfEmptyEntityFromSchemaToMessage() { Hml.Schema.Register schema = new Hml.Schema.Register { Registrar = new Hml.Schema.Identity { Value = "RegistrarIdentity" }, Entity = EmptytEntity }; Message.IMessage message = _subject.ToMessage(schema); Assert.IsInstanceOfType(message, typeof(Message.IRegister)); Assert.AreEqual <string>("RegistrarIdentity", ((Message.IRegister)message).Registrar.Value); }
public void CanMapRegisterOfFullyPopulatedEntityFromSchemaToMessage() { Hml.Schema.Register schema = new Hml.Schema.Register { Registrar = new Hml.Schema.Identity { Value = "Registrar" }, Entity = FullPopulatedEntity }; Message.IMessage message = _subject.ToMessage(schema); Assert.IsInstanceOfType(message, typeof(Message.IRegister)); Assert.AreEqual <string>("Registrar", ((Message.IRegister)message).Registrar.Value); Assert.IsNotNull(((Message.IRegister)message).Entity); }
public void CanMapRegisterOfFullyPopulatedEntityFromSchemaToMessage() { Hml.Schema.Register schema = new Hml.Schema.Register { Registrar = new Hml.Schema.Identity { Value = "Registrar" }, Entity = FullPopulatedEntity }; Message.IMessage message = _subject.ToMessage(schema); Assert.IsInstanceOfType(message, typeof(Message.IRegister)); Assert.AreEqual<string>("Registrar", ((Message.IRegister)message).Registrar.Value); Assert.IsNotNull(((Message.IRegister)message).Entity); }
public void CanMapRegisterOfEmptyEntityFromSchemaToMessage() { Hml.Schema.Register schema = new Hml.Schema.Register { Registrar = new Hml.Schema.Identity { Value = "RegistrarIdentity" }, Entity = EmptytEntity }; Message.IMessage message = _subject.ToMessage(schema); Assert.IsInstanceOfType(message, typeof(Message.IRegister)); Assert.AreEqual<string>("RegistrarIdentity", ((Message.IRegister)message).Registrar.Value); }