public void Missing_name_property_and_with_empty_id()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            Assert.Throws <MissingIdException>(
                () => resolver.GetEntityName(new EntityWithoutName()));
        }
        public void Valid_id_property_but_empty_id()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            var newId = resolver.GetEntityId(new EntityWithCorrectIdType(), true);

            Assert.NotEqual(Guid.Empty, newId);
        }
        public void Invalid_entity_property_id_type()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            Assert.Throws <WrongIdPropertyTypeException>(
                () => resolver.GetEntityId(new EntityWithWrongIdType())
                );
        }
        public void Missing_entity_property_id()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            Assert.Throws <MissingIdPropertyException>(
                () => resolver.GetEntityId(new EntityWithoutIdProperty())
                );
        }
        public void Valid_id_property_and_id_not_empty()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            var id       = Guid.NewGuid();
            var entityId = resolver.GetEntityId(new EntityWithCorrectIdType
            {
                Id = id
            });

            Assert.Equal(id, entityId);
        }
        public void Missing_name_property_with_id_not_empty()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            var entityId   = Guid.NewGuid();
            var entityName = resolver.GetEntityName(new EntityWithoutName
            {
                Id = entityId
            });

            var hash = resolver.GenerateIdHash(entityId);

            Assert.Equal(hash, entityName);
        }
        public void Generate_id_hash()
        {
            var resolver = new EntityPropertyResolver <FakeEntityContext>();

            var hash = resolver.GenerateIdHash(new Guid("ef6f8868-6f09-4f54-b23f-5e616cca4f1c"));
        }