BAEL-3502 Apply correct formatter.

This commit is contained in:
Florin Hriscu 2020-02-16 17:34:31 +02:00
parent af1fd4e1b0
commit dcccf21e0d
3 changed files with 191 additions and 198 deletions

View File

@ -78,10 +78,8 @@ public class ArraysDeepEqualsUnitTest {
@Test
void givenTwoMultidimensionalObjectTypeArrays_whenUsingEqualsAndDeepEquals_thenBothShouldReturnDifferently() {
Person personArray1[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) },
{ new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
Person personArray2[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) },
{ new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
Person personArray1[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) }, { new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
Person personArray2[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) }, { new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
assertFalse(Arrays.equals(personArray1, personArray2));
assertTrue(Arrays.deepEquals(personArray1, personArray2));
@ -89,10 +87,8 @@ public class ArraysDeepEqualsUnitTest {
@Test
void givenTwoMultidimensionalObjectTypeArrays_whenUsingDeepEqualsFromObjectsAndArraysClasses_thenBothShouldReturnTrue() {
Person personArray1[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) },
{ new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
Person personArray2[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) },
{ new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
Person personArray1[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) }, { new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
Person personArray2[][] = { { new Person(1, "John", 22), new Person(2, "Mike", 23) }, { new Person(3, "Steve", 27), new Person(4, "Gary", 28) } };
assertTrue(Objects.deepEquals(personArray1, personArray2));
assertTrue(Arrays.deepEquals(personArray1, personArray2));

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.core-java-modules</groupId>
@ -52,13 +53,9 @@
<!-- <module>core-java-date-operations-1</module> --> <!-- We haven't upgraded to java 9. Fixing in BAEL-10841 -->
<module>core-java-date-operations-2</module>
<!-- We haven't upgraded to java 9.-->
<!--
<module>core-java-datetime-computations</module>
<module>core-java-datetime-conversion</module>
<module>core-java-datetime-java8</module>
<module>core-java-datetime-string</module>
-->
<!-- We haven't upgraded to java 9. -->
<!-- <module>core-java-datetime-computations</module> <module>core-java-datetime-conversion</module>
<module>core-java-datetime-java8</module> <module>core-java-datetime-string</module> -->
<module>core-java-exceptions</module>
<module>core-java-exceptions-2</module>
@ -93,7 +90,7 @@
<module>core-java-nio-2</module>
<module>core-java-optional</module>
<!--<module>core-java-os</module> --> <!-- We haven't upgraded to java 9.-->
<!--<module>core-java-os</module> --> <!-- We haven't upgraded to java 9. -->
<module>core-java-perf</module>