Esempio n. 1
0
            public void NonIdentityColumnIsNotUnpredictable()
            {
                //Arrange
                CreateTable("INT PRIMARY KEY", null);
                var column = GetColumn("AKey");

                //Act
                var(result, _, _) = UnpredictableColumnDetector.IsUnpredictable(column);

                //Assert
                result.Should().BeFalse();
            }
Esempio n. 2
0
            public void DateTimeWithoutDefaultIsNotUnpredictable()
            {
                //Arrange
                CreateTable(null, "DATETIME");
                var column = GetColumn("Value");

                //Act
                var(result, _, _) = UnpredictableColumnDetector.IsUnpredictable(column);

                //Assert
                result.Should().BeFalse();
            }
Esempio n. 3
0
            public void GuidColumnIsUnpredictable()
            {
                //Arrange
                CreateTable("UNIQUEIDENTIFIER PRIMARY KEY", null);
                var column = GetColumn("AKey");

                //Act
                var(result, _, _) = UnpredictableColumnDetector.IsUnpredictable(column);

                //Assert
                result.Should().BeTrue();
            }
Esempio n. 4
0
            public void DefaultedDateValuesAreLocal(string fieldDef, bool shouldBeLocal)
            {
                //Arrange
                CreateTable(null, fieldDef);
                var column = GetColumn("Value");

                //Act
                var(_, _, result) = UnpredictableColumnDetector.IsUnpredictable(column);

                //Assert
                result.Should().Be(shouldBeLocal);
            }