BAEL-1157: code indentation

This commit is contained in:
Dassi Orleando 2017-10-05 04:17:56 +01:00
parent 0dbfa53ae0
commit 3f825c5b96

View File

@ -25,8 +25,8 @@ public class CayenneAdvancedOperationTests {
@BeforeClass
public static void setupTheCayenneContext() {
ServerRuntime cayenneRuntime = ServerRuntime.builder()
.addConfig("cayenne-project.xml")
.build();
.addConfig("cayenne-project.xml")
.build();
context = cayenneRuntime.newContext();
}
@ -123,8 +123,8 @@ public class CayenneAdvancedOperationTests {
@Test
public void givenAuthors_onContainsObjS_thenWeGetOneRecord() {
List<Author> authors = ObjectSelect.query(Author.class)
.where(Author.NAME.contains("Paul"))
.select(context);
.where(Author.NAME.contains("Paul"))
.select(context);
assertEquals(authors.size(), 1);
}
@ -132,8 +132,8 @@ public class CayenneAdvancedOperationTests {
@Test
public void givenAuthors_whenLikeObjS_thenWeGetTwoAuthors() {
List<Author> authors = ObjectSelect.query(Author.class)
.where(Author.NAME.likeIgnoreCase("Paul%"))
.select(context);
.where(Author.NAME.likeIgnoreCase("Paul%"))
.select(context);
assertEquals(authors.size(), 2);
}
@ -141,8 +141,8 @@ public class CayenneAdvancedOperationTests {
@Test
public void givenTwoAuthor_whenEndsWithObjS_thenWeGetOrderedAuthors() {
List<Author> authors = ObjectSelect.query(Author.class)
.where(Author.NAME.endsWith("Sarra"))
.select(context);
.where(Author.NAME.endsWith("Sarra"))
.select(context);
Author firstAuthor = authors.get(0);
assertEquals(authors.size(), 1);
@ -153,8 +153,8 @@ public class CayenneAdvancedOperationTests {
public void givenTwoAuthor_whenInObjS_thenWeGetAuthors() {
String [] args = {"Paul Xavier", "pAuL Smith", "Vicky Sarra"};
List<Author> authors = ObjectSelect.query(Author.class)
.where(Author.NAME.in(Arrays.asList(args)))
.select(context);
.where(Author.NAME.in(Arrays.asList(args)))
.select(context);
assertEquals(authors.size(), 3);
}
@ -163,8 +163,8 @@ public class CayenneAdvancedOperationTests {
public void givenTwoAuthor_whenNinObjS_thenWeGetAuthors() {
String [] args = {"Paul Xavier", "pAuL Smith"};
List<Author> authors = ObjectSelect.query(Author.class)
.where(Author.NAME.nin(Arrays.asList(args)))
.select(context);
.where(Author.NAME.nin(Arrays.asList(args)))
.select(context);
Author author = authors.get(0);
assertEquals(authors.size(), 1);
@ -174,8 +174,8 @@ public class CayenneAdvancedOperationTests {
@Test
public void givenTwoAuthor_whenIsNotNullObjS_thenWeGetAuthors() {
List<Author> authors = ObjectSelect.query(Author.class)
.where(Author.NAME.isNotNull())
.select(context);
.where(Author.NAME.isNotNull())
.select(context);
assertEquals(authors.size(), 3);
}
@ -239,8 +239,8 @@ public class CayenneAdvancedOperationTests {
@Test
public void givenAuthors_whenInsertingSQLExec_thenWeGetNewAuthor() {
int inserted = SQLExec
.query("INSERT INTO Author (name) VALUES ('Baeldung')")
.update(context);
.query("INSERT INTO Author (name) VALUES ('Baeldung')")
.update(context);
assertEquals(inserted, 1);
}
@ -248,8 +248,8 @@ public class CayenneAdvancedOperationTests {
@Test
public void givenAuthors_whenUpdatingSQLExec_thenItsUpdated() {
int updated = SQLExec
.query("UPDATE Author SET name = 'Baeldung' WHERE name = 'Vicky Sarra'")
.update(context);
.query("UPDATE Author SET name = 'Baeldung' WHERE name = 'Vicky Sarra'")
.update(context);
assertEquals(updated, 1);
}