public void GetUniqueKey_without_unique_key_throws()
        {
            var m  = new AttributesMappingManager();
            var pk = m.GetUniqueKey(typeof(AnotherEntity));

            Assert.IsNull(pk);
        }
 public void Inherited() {
     var m = new AttributesMappingManager();
     var fields = m.GetFields(typeof (InheritedEntity));
     Assert.AreEqual(3, fields.Count);
     var uniqueKey = m.GetUniqueKey(typeof(InheritedEntity));
     Assert.IsNotNull(uniqueKey);
     Assert.AreEqual("Id", uniqueKey.FieldName);
 }
		public void GetUniqueKey() {
			var m = new AttributesMappingManager();
			var key = m.GetUniqueKey(typeof (Entity));
			Assert.IsNotNull(key);
			Assert.IsNotNull(key.Property);
			Assert.AreEqual("Id", key.Property.Name);
			Assert.AreEqual("Id", key.FieldName);
		}
        public void GetUniqueKey()
        {
            var m   = new AttributesMappingManager();
            var key = m.GetUniqueKey(typeof(Entity));

            Assert.IsNotNull(key);
            Assert.IsNotNull(key.Property);
            Assert.AreEqual("Id", key.Property.Name);
            Assert.AreEqual("Id", key.FieldName);
        }
 public void DifferentTypes() {
     var m = new AttributesMappingManager();
     var key = m.GetUniqueKey(typeof(Entity));
     Assert.IsNotNull(key);
     Assert.IsNotNull(key.Property);
     Assert.AreEqual("Id", key.Property.Name);
     Assert.AreEqual("Id", key.FieldName);
     var fields = m.GetFields(typeof (AnotherEntity));
     Assert.AreEqual(1, fields.Count);
 }
        public void Inherited()
        {
            var m      = new AttributesMappingManager();
            var fields = m.GetFields(typeof(InheritedEntity));

            Assert.AreEqual(3, fields.Count);
            var uniqueKey = m.GetUniqueKey(typeof(InheritedEntity));

            Assert.IsNotNull(uniqueKey);
            Assert.AreEqual("Id", uniqueKey.FieldName);
        }
        public void DifferentTypes()
        {
            var m   = new AttributesMappingManager();
            var key = m.GetUniqueKey(typeof(Entity));

            Assert.IsNotNull(key);
            Assert.IsNotNull(key.Property);
            Assert.AreEqual("Id", key.Property.Name);
            Assert.AreEqual("Id", key.FieldName);
            var fields = m.GetFields(typeof(AnotherEntity));

            Assert.AreEqual(1, fields.Count);
        }
 public void GetUniqueKey_without_unique_key_throws()
 {
     var m = new AttributesMappingManager();
     var pk = m.GetUniqueKey(typeof (AnotherEntity));
     Assert.IsNull(pk);
 }
 public void GetUniqueKey_without_unique_key_throws()
 {
     var m = new AttributesMappingManager();
     m.GetUniqueKey(typeof (AnotherEntity));
 }