Exemplo n.º 1
0
 public void VerityIsWarningSuppressedIsFalseByDefault()
 {
     var options = new MigrationOptions();
     Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 0, 0));
     Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 1, 0));
     Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
 }
Exemplo n.º 2
0
 public void VerifyIsWarningSuppressedIsFalseByDefault()
 {
     var options = new MigrationOptions();
     Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 0, 0));
     Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 1, 0));
     Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 1, 1));
 }
Exemplo n.º 3
0
 public void VerifySuppressWarningWithSizeAndScale()
 {
     var options = new MigrationOptions();
     options.SuppressWarning(ProviderName, Type, SuppressCondition.WhenSpecifiedWithSizeAndScale);
     Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 0, 0));
     Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 1, 0));
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
 }
Exemplo n.º 4
0
 public void VerifySuppressWarningAlways()
 {
     var options = new MigrationOptions();
     options.SuppressWarning(ProviderName, Type, SuppressCondition.Always);
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 0, 0));
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 0));
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
 }
Exemplo n.º 5
0
        public void VerityIsWarningSuppressedIsFalseByDefault()
        {
            var options = new MigrationOptions();

            Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 0, 0));
            Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 1, 0));
            Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
        }
Exemplo n.º 6
0
 public void VerifySuppressWarningWithSize()
 {
     var options = new MigrationOptions();
     options.SuppressWarning(Platform, Type, SuppressCondition.WhenSpecifiedWithSize);
     Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, null, null));
     Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, 1, null));
     Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 1, 1));
 }
Exemplo n.º 7
0
 public void VerifySuppressWarningAlways()
 {
     var options = new MigrationOptions();
     options.SuppressWarning(Platform, Type, SuppressCondition.Always);
     Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, null, null));
     Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, 1, null));
     Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, 1, 1));
 }
Exemplo n.º 8
0
        public void VerifyIsWarningSuppressedIsFalseByDefault()
        {
            var options = new MigrationOptions();

            Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 0, 0));
            Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 1, 0));
            Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 1, 1));
        }
Exemplo n.º 9
0
        public void VerifySuppressWarningWithSizeAndScale()
        {
            var options = new MigrationOptions();

            options.SuppressWarning(ProviderName, Type, SuppressCondition.WhenSpecifiedWithSizeAndScale);
            Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 0, 0));
            Assert.IsFalse(options.IsWarningSuppressed(ProviderName, Type, 1, 0));
            Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
        }
Exemplo n.º 10
0
        public void VerifySuppressWarningAlways()
        {
            var options = new MigrationOptions();

            options.SuppressWarning(ProviderName, Type, SuppressCondition.Always);
            Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 0, 0));
            Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 0));
            Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
        }
Exemplo n.º 11
0
        public void VerifySuppressWarningWithSize()
        {
            var options = new MigrationOptions();

            options.SuppressWarning(Platform, Type, SuppressCondition.WhenSpecifiedWithSize);
            Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, null, null));
            Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, 1, null));
            Assert.IsFalse(options.IsWarningSuppressed(Platform, Type, 1, 1));
        }
Exemplo n.º 12
0
        public void VerifySuppressWarningAlways()
        {
            var options = new MigrationOptions();

            options.SuppressWarning(Platform, Type, SuppressCondition.Always);
            Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, null, null));
            Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, 1, null));
            Assert.IsTrue(options.IsWarningSuppressed(Platform, Type, 1, 1));
        }
Exemplo n.º 13
0
 public void VerifySuppressWarningCombined()
 {
     var options = new MigrationOptions();
     options.SuppressWarning(ProviderName, Type, SuppressCondition.WhenSpecifiedWithoutSize);
     options.SuppressWarning(ProviderName, Type, SuppressCondition.WhenSpecifiedWithSize);
     options.SuppressWarning(ProviderName, Type, SuppressCondition.WhenSpecifiedWithSizeAndScale);
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, null, null));
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, null));
     Assert.IsTrue(options.IsWarningSuppressed(ProviderName, Type, 1, 1));
 }
Exemplo n.º 14
0
 private bool WarningIsSuppressed(ValidationWarning warning)
 {
     return(_options.IsWarningSuppressed(warning.ProviderName, warning.DataType.DbType, warning.DataType.Size, warning.DataType.Scale));
 }