Esempio n. 1
0
        public void Sentinel_value_on_nullable_property_can_be_skipped_by_value_generator()
        {
            var property = GetEntityType().GetProperty("NullableInt");

            var valueGenerator = new TemporaryNumberValueGeneratorFactory().Create(property);

            Assert.Equal(
                new[] { -1, -3, -4 },
                new[]
            {
                (int)valueGenerator.NextSkippingSentinel(property),
                (int)valueGenerator.NextSkippingSentinel(property),
                (int)valueGenerator.NextSkippingSentinel(property)
            });
        }
        public void Sentinel_value_on_nullable_property_can_be_skipped_by_value_generator()
        {
            var property = GetEntityType().GetProperty("NullableInt");

            var valueGenerator = new TemporaryNumberValueGeneratorFactory().Create(property);

            Assert.Equal(
                new[] { -1, -3, -4 },
                new[]
                {
                    (int)valueGenerator.NextSkippingSentinel(property),
                    (int)valueGenerator.NextSkippingSentinel(property),
                    (int)valueGenerator.NextSkippingSentinel(property)
                });
        }