Package com.foundationdb.ais.model.validation

Examples of com.foundationdb.ais.model.validation.AISValidationResults.failures()


        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        Assert.assertEquals(ErrorCode.MULTIPLE_IDENTITY_COLUMNS, fail.errorCode());
    }

   
    @Test
View Full Code Here


        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        Assert.assertEquals(ErrorCode.SEQUENCE_INTERVAL_ZERO, fail.errorCode());
    }

    @Test
View Full Code Here

        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        Assert.assertEquals(ErrorCode.SEQUENCE_INTERVAL_ZERO, fail.errorCode());
    }

    @Test
    public void validateIdentityMinMax1() {
View Full Code Here

        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(2, vResults.failures().size());
        Iterator<AISValidationFailure> errors = vResults.failures().iterator();
       
        AISValidationFailure fail = errors.next();
        assertEquals(ErrorCode.SEQUENCE_MIN_GE_MAX, fail.errorCode());
        fail = errors.next();
View Full Code Here

        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(2, vResults.failures().size());
        Iterator<AISValidationFailure> errors = vResults.failures().iterator();
       
        AISValidationFailure fail = errors.next();
        assertEquals(ErrorCode.SEQUENCE_MIN_GE_MAX, fail.errorCode());
        fail = errors.next();
        assertEquals(ErrorCode.SEQUENCE_START_IN_RANGE, fail.errorCode());
View Full Code Here

        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        Assert.assertEquals(ErrorCode.SEQUENCE_MIN_GE_MAX, fail.errorCode());
    }

    @Test
View Full Code Here

        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
       
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        Assert.assertEquals(ErrorCode.SEQUENCE_MIN_GE_MAX, fail.errorCode());
    }

    @Test
    public void validateIdentityVarchar() {
View Full Code Here

        builder.basicSchemaIsComplete();
        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        assertEquals(ErrorCode.GENERATOR_WRONG_DATATYPE, fail.errorCode());
    }
   
    @Test
View Full Code Here

        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        assertEquals(ErrorCode.GENERATOR_WRONG_DATATYPE, fail.errorCode());
    }
   
    @Test
    public void validateIdentityDecimal() {
View Full Code Here

        builder.basicSchemaIsComplete();
        builder.createGroup("group", "test");
        builder.addTableToGroup("group", "test", "t1");
        builder.groupingIsComplete();
        AISValidationResults vResults = builder.akibanInformationSchema().validate(AISValidations.BASIC_VALIDATIONS);
        Assert.assertEquals(1, vResults.failures().size());
        AISValidationFailure fail = vResults.failures().iterator().next();
        assertEquals(ErrorCode.GENERATOR_WRONG_DATATYPE, fail.errorCode());
    }
   
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.