Пример #1
0
        public void MetaWrapper_GetMetaData_returns_null_if_item_not_registered()
        {
            var entity = new Entity();
            var result = MetaWrapper <Entity, EntityMetaData> .GetMetaData(entity);

            Assert.IsNull(result);
        }
Пример #2
0
        public void Meta_wrapper_identity_property_cast_is_same()
        {
            var entity  = new Entity();
            var wrapped = MetaWrapper <Entity, EntityMetaData>
                          .Create(entity, new EntityMetaData()
            {
                Id = Guid.NewGuid().ToString()
            });

            MetaWrapper <Entity, EntityMetaData> unwrapped = wrapped;

            Assert.AreEqual(unwrapped.Meta.Id, MetaWrapper <Entity, EntityMetaData> .GetMetaData(wrapped).Id);
        }