コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: MapperTests.cs プロジェクト: Zananok/Harmonize
        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);
        }
コード例 #4
0
ファイル: MapperTests.cs プロジェクト: Zananok/Harmonize
        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);
        }