public void Returns_null_if_any_value_in_the_given_buffer_is_null()
        {
            var model = BuildModel();
            var type  = model.GetEntityType(typeof(Banana));

            var random = new Random();

            var key = new CompositeEntityKeyFactory().Create(
                type,
                new[] { type.GetProperty("P6"), type.GetProperty("P5") },
                new ObjectArrayValueReader(new object[] { 7, "Ate", random, 77, null, random }));

            Assert.Equal(EntityKey.NullEntityKey, key);
        }
        public void Returns_null_if_any_value_in_the_given_buffer_is_null()
        {
            var model = BuildModel();
            var type = model.GetEntityType(typeof(Banana));

            var random = new Random();

            var key = new CompositeEntityKeyFactory().Create(
                type,
                new[] { type.GetProperty("P6"), type.GetProperty("P5") },
                new ObjectArrayValueReader(new object[] { 7, "Ate", random, 77, null, random }));

            Assert.Equal(EntityKey.NullEntityKey, key);
        }
        public EntityKeyFactorySource([NotNull] CompositeEntityKeyFactory compositeKeyFactory)
        {
            Check.NotNull(compositeKeyFactory, "compositeKeyFactory");

            _compositeKeyFactory = compositeKeyFactory;
        }
Exemplo n.º 4
0
        public EntityKeyFactorySource([NotNull] CompositeEntityKeyFactory compositeKeyFactory)
        {
            Check.NotNull(compositeKeyFactory, "compositeKeyFactory");

            _compositeKeyFactory = compositeKeyFactory;
        }