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