Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void fails_if_parameters_are_not_properly_annotated()
        public virtual void FailsIfParametersAreNotProperlyAnnotated()
        {
            JavaFileObject sproc = JavaFileObjectUtils.INSTANCE.procedureSource("invalid/missing_name/MissingNameSproc.java");

            UnsuccessfulCompilationClause compilation = assert_().about(javaSource()).that(sproc).processedWith(Processor()).failsToCompile().withErrorCount(2);

            compilation.withErrorContaining("@org.neo4j.procedure.Name usage error: missing on parameter <parameter>").@in(sproc).onLine(35);

            compilation.withErrorContaining("@org.neo4j.procedure.Name usage error: missing on parameter <otherParam>").@in(sproc).onLine(35);
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void fails_if_record_type_has_nonpublic_fields()
        public virtual void FailsIfRecordTypeHasNonpublicFields()
        {
            JavaFileObject record = JavaFileObjectUtils.INSTANCE.procedureSource("invalid/bad_record_type/BadRecord.java");

            UnsuccessfulCompilationClause compilation = assert_().about(javaSources()).that(asList(JavaFileObjectUtils.INSTANCE.procedureSource("invalid/bad_record_type/BadRecordTypeSproc.java"), record)).processedWith(Processor()).failsToCompile().withErrorCount(2);

            compilation.withErrorContaining("Record definition error: field BadRecord#label must be public").@in(record).onLine(26);

            compilation.withErrorContaining("Record definition error: field BadRecord#age must be public").@in(record).onLine(27);
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void fails_if_procedure_generic_record_field_type_is_not_supported()
        public virtual void FailsIfProcedureGenericRecordFieldTypeIsNotSupported()
        {
            JavaFileObject record = JavaFileObjectUtils.INSTANCE.procedureSource("invalid/bad_record_field_type/BadRecordGenericFieldType.java");

            UnsuccessfulCompilationClause compilation = assert_().about(javaSources()).that(asList(JavaFileObjectUtils.INSTANCE.procedureSource("invalid/bad_record_field_type/BadRecordGenericFieldTypeSproc.java"), record)).processedWith(Processor()).failsToCompile().withErrorCount(3);

            compilation.withErrorContaining("Record definition error: type of field BadRecordGenericFieldType#wrongType1 is not supported").@in(record).onLine(34);
            compilation.withErrorContaining("Record definition error: type of field BadRecordGenericFieldType#wrongType2 is not supported").@in(record).onLine(35);
            compilation.withErrorContaining("Record definition error: type of field BadRecordGenericFieldType#wrongType3 is not supported").@in(record).onLine(36);
        }
Exemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void fails_if_procedure_generic_input_type_is_not_supported()
        public virtual void FailsIfProcedureGenericInputTypeIsNotSupported()
        {
            JavaFileObject sproc = JavaFileObjectUtils.INSTANCE.procedureSource("invalid/bad_proc_input_type/BadGenericInputSproc.java");

            UnsuccessfulCompilationClause compilation = assert_().about(javaSource()).that(sproc).processedWith(Processor()).failsToCompile().withErrorCount(3);

            compilation.withErrorContaining("Unsupported parameter type " + "<java.util.List<java.util.List<java.util.Map<java.lang.String,java.lang.Thread>>>>" + " of procedure|function BadGenericInputSproc#doSomething").@in(sproc).onLine(36);

            compilation.withErrorContaining("Unsupported parameter type " + "<java.util.Map<java.lang.String,java.util.List<java.util.concurrent.ExecutorService>>>" + " of procedure|function BadGenericInputSproc#doSomething2").@in(sproc).onLine(42);

            compilation.withErrorContaining("Unsupported parameter type <java.util.Map> of procedure|function BadGenericInputSproc#doSomething3").@in(sproc).onLine(48);
        }