コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public EntityKeyFactorySource([NotNull] CompositeEntityKeyFactory compositeKeyFactory)
        {
            Check.NotNull(compositeKeyFactory, "compositeKeyFactory");

            _compositeKeyFactory = compositeKeyFactory;
        }
コード例 #4
0
        public EntityKeyFactorySource([NotNull] CompositeEntityKeyFactory compositeKeyFactory)
        {
            Check.NotNull(compositeKeyFactory, "compositeKeyFactory");

            _compositeKeyFactory = compositeKeyFactory;
        }