solomax commented on code in PR #305:
URL: https://github.com/apache/openjpa/pull/305#discussion_r4538669940
##########
openjpa-jdbc/src/test/java/org/apache/openjpa/jdbc/sql/identifier/TestDBIdentifiers.java:
##########
@@ -17,48 +17,53 @@
* under the License.
*/
package org.apache.openjpa.jdbc.sql.identifier;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import org.apache.openjpa.jdbc.identifier.DBIdentifier;
import org.apache.openjpa.jdbc.identifier.DBIdentifier.DBIdentifierType;
import org.apache.openjpa.jdbc.identifier.QualifiedDBIdentifier;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
+import org.junit.jupiter.api.Test;
/**
* Test operations on DBIdentifier and QualifiedDBIdentifier.
*
*/
-public class TestDBIdentifiers {
+class TestDBIdentifiers {
@Test
- public void testSchemaOps() {
+ void schemaOps() {
// Use a schema name with punctuation. It will get normalized with
// delimiters.
QualifiedDBIdentifier p1 =
QualifiedDBIdentifier.newPath(DBIdentifier.newSchema("my.schema"));
DBIdentifier s1 = DBIdentifier.newSchema("my.schema");
assertTrue(DBIdentifier.equal(p1, s1));
assertEquals("\"my.schema\"", p1.getName());
assertEquals("\"my.schema\"", s1.getName());
- assertEquals(p1.getType(), DBIdentifierType.SCHEMA);
- assertEquals(s1.getType(), DBIdentifierType.SCHEMA);
+ assertEquals(DBIdentifierType.SCHEMA, p1.getType());
+ assertEquals(DBIdentifierType.SCHEMA, s1.getType());
assertFalse(s1 instanceof QualifiedDBIdentifier);
QualifiedDBIdentifier p2 =
QualifiedDBIdentifier.newPath(DBIdentifier.newSchema("SCHEMA"));
DBIdentifier s2 = DBIdentifier.newSchema("SCHEMA2");
assertFalse(DBIdentifier.equal(p2, s2));
- assertEquals("SCHEMA", p2.getName());
+ assertEquals("\"SCHEMA\"", p2.getName());
Review Comment:
this one seems to depend on test execution order ... :(
--
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]