rpuch commented on a change in pull request #467:
URL: https://github.com/apache/ignite-3/pull/467#discussion_r755792479
##########
File path:
modules/configuration-annotation-processor/src/integrationTest/java/org/apache/ignite/internal/configuration/processor/ItProcessorTest.java
##########
@@ -292,4 +292,18 @@ private static BatchCompilation batchCompile(String
packageName, String... class
return batchCompile(classes);
}
+
+ @Test
+ void
confiurationSchemaClassShouldBeCheckedToEndWithConfigurationSchemaPostfix() {
Review comment:
Renamed as suggested
##########
File path:
modules/configuration-annotation-processor/src/integrationTest/java/org/apache/ignite/internal/configuration/processor/ItProcessorTest.java
##########
@@ -292,4 +292,18 @@ private static BatchCompilation batchCompile(String
packageName, String... class
return batchCompile(classes);
}
+
+ @Test
+ void
confiurationSchemaClassShouldBeCheckedToEndWithConfigurationSchemaPostfix() {
+ String packageName =
"org.apache.ignite.internal.configuration.processor";
+
+ ClassName schema = ClassName.get(packageName,
"ConfigurationSchemaWithWrongPostfix");
+
+ Compilation compilation = compile(schema);
+
+ assertThat(compilation).failed();
+ assertThat(compilation).hadErrorContaining("Name of a class annotated
with one of [");
+ assertThat(compilation).hadErrorContaining(
+ "] must end with 'ConfigurationSchema', but for
'ConfigurationSchemaWithWrongPostfix' it does not");
Review comment:
Done
##########
File path:
modules/configuration-annotation-processor/src/integrationTest/resources/org/apache/ignite/internal/configuration/processor/ConfigurationSchemaWithWrongPostfix.java
##########
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.configuration.processor;
+
+import org.apache.ignite.configuration.annotation.ConfigurationRoot;
+import org.apache.ignite.configuration.annotation.Value;
+
+@ConfigurationRoot(rootName = "wrongPostfix")
+public class ConfigurationSchemaWithWrongPostfix {
+ @Value
+ public String value1;
Review comment:
Removed the field
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]