BAEL-680: rename test methods (#1470)

* Add files via upload

* Update pom.xml

* Update RunGuice.java

* Update Communication.java

* Update CommunicationMode.java

* Update DefaultCommunicator.java

* Update EmailCommunicationMode.java

* Update IMCommunicationMode.java

* Update SMSCommunicationMode.java

* Update MessageLogger.java

* Update MessageSentLoggable.java

* Update AOPModule.java

* Update BasicModule.java

* Update CommunicationModel.java

* Update Communicator.java

* Update BasicModule.java

* Update RunGuice.java

* Update MessageLogger.java

* Update Communicator.java

* Update pom.xml

* BAEL-278: Updated README.md

* BAEL-554: Add and update README.md files

* Update pom.xml

* Update pom.xml

* Update pom.xml

* BAEL-345: fixed assertion

* BAEL-109: Updated README.md

* BAEL-345: Added README.md

* Reinstating reactor-core module in root-level pom

* BAEL-393: Adding guide-intro module to root pom

* BAEL-9: Updated README.md

* BAEL-157: README.md updated

* Changed project name

* Update RunGuice.java

Removed references to message logging and output

* Update Communication.java

Removed message logging-related code

* BAEL-566: Updated README.md

* New project name

* BAEL-393: removing guice-intro directory

* BAEL-393: renamed module guice-intro to guice in root pom.xml

* BAEL-393 and BAEL-541 README.md files

* BAEL-731: Updated README.md

* BAEL-680: renamed test methods
This commit is contained in:
KevinGilmore 2017-03-21 17:46:06 -05:00 committed by GitHub
parent bd237b2115
commit d66703b5d9
1 changed files with 12 additions and 48 deletions

View File

@ -60,7 +60,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingComparing_thenCheckingSort() {
public void whenComparing_thenSortedByName() {
Comparator<Employee> employeeNameComparator = Comparator.comparing(Employee::getName);
Arrays.sort(employees, employeeNameComparator);
// System.out.println(Arrays.toString(employees));
@ -68,7 +68,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingComparingWithComparator_thenCheckingSort() {
public void whenComparingWithComparator_thenSortedByNameDesc() {
Comparator<Employee> employeeNameComparator = Comparator.comparing(Employee::getName, (s1, s2) -> {
return s2.compareTo(s1);
});
@ -78,7 +78,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingComparingInt_thenCheckingSort() {
public void whenComparingInt_thenSortedByAge() {
Comparator<Employee> employeeAgeComparator = Comparator.comparingInt(Employee::getAge);
Arrays.sort(employees, employeeAgeComparator);
// System.out.println(Arrays.toString(employees));
@ -86,7 +86,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingComparingLong_thenCheckingSort() {
public void whenComparingLong_thenSortedByMobile() {
Comparator<Employee> employeeMobileComparator = Comparator.comparingLong(Employee::getMobile);
Arrays.sort(employees, employeeMobileComparator);
// System.out.println(Arrays.toString(employees));
@ -94,7 +94,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingComparingDouble_thenCheckingSort() {
public void whenComparingDouble_thenSortedBySalary() {
Comparator<Employee> employeeSalaryComparator = Comparator.comparingDouble(Employee::getSalary);
Arrays.sort(employees, employeeSalaryComparator);
// System.out.println(Arrays.toString(employees));
@ -102,7 +102,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingNaturalOrder_thenCheckingSort() {
public void whenNaturalOrder_thenSortedByName() {
Comparator<Employee> employeeNameComparator = Comparator.<Employee> naturalOrder();
Arrays.sort(employees, employeeNameComparator);
// System.out.println(Arrays.toString(employees));
@ -110,7 +110,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingReverseOrder_thenCheckingSort() {
public void whenReverseOrder_thenSortedByNameDesc() {
Comparator<Employee> employeeNameComparator = Comparator.<Employee> reverseOrder();
Arrays.sort(employees, employeeNameComparator);
// System.out.println(Arrays.toString(employees));
@ -118,7 +118,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingNullFirst_thenCheckingSort() {
public void whenNullsFirst_thenSortedByNameWithNullsFirst() {
Comparator<Employee> employeeNameComparator = Comparator.comparing(Employee::getName);
Comparator<Employee> employeeNameComparator_nullFirst = Comparator.nullsFirst(employeeNameComparator);
Arrays.sort(employeesArrayWithNulls, employeeNameComparator_nullFirst);
@ -127,7 +127,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingNullLast_thenCheckingSort() {
public void whenNullsLast_thenSortedByNameWithNullsLast() {
Comparator<Employee> employeeNameComparator = Comparator.comparing(Employee::getName);
Comparator<Employee> employeeNameComparator_nullLast = Comparator.nullsLast(employeeNameComparator);
Arrays.sort(employeesArrayWithNulls, employeeNameComparator_nullLast);
@ -136,7 +136,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingThenComparing_thenCheckingSort() {
public void whenThenComparing_thenSortedByAgeName() {
Comparator<Employee> employee_Age_Name_Comparator = Comparator.comparing(Employee::getAge).thenComparing(Employee::getName);
Arrays.sort(someMoreEmployees, employee_Age_Name_Comparator);
@ -145,7 +145,7 @@ public class Java8ComparatorTest {
}
@Test
public void givenEmployeeArray_whenUsingThenComparingInt_thenCheckingSort() {
public void whenThenComparing_thenSortedByNameAge() {
Comparator<Employee> employee_Name_Age_Comparator = Comparator.comparing(Employee::getName).thenComparingInt(Employee::getAge);
Arrays.sort(someMoreEmployees, employee_Name_Age_Comparator);
@ -153,40 +153,4 @@ public class Java8ComparatorTest {
assertTrue(Arrays.equals(someMoreEmployees, sortedEmployeesByNameAge));
}
@Before
public void printData() {
// System.out.println("employees");
// System.out.println(Arrays.toString(employees));
//
// System.out.println("employeesArrayWithNulls");
// System.out.println(Arrays.toString(employeesArrayWithNulls));
//
// System.out.println("sortedEmployeesByName");
// System.out.println(Arrays.toString(sortedEmployeesByName));
//
// System.out.println("sortedEmployeesByNameDesc");
// System.out.println(Arrays.toString(sortedEmployeesByNameDesc));
//
// System.out.println("sortedEmployeesByAge");
// System.out.println(Arrays.toString(sortedEmployeesByAge));
//
// System.out.println("sortedEmployeesByMobile");
// System.out.println(Arrays.toString(sortedEmployeesByMobile));
//
// System.out.println("sortedEmployeesBySalary");
// System.out.println(Arrays.toString(sortedEmployeesBySalary));
//
// System.out.println("sortedEmployeesArray_WithNullsFirst");
// System.out.println(Arrays.toString(sortedEmployeesArray_WithNullsFirst));
//
// System.out.println("sortedEmployeesArray_WithNullsLast");
// System.out.println(Arrays.toString(sortedEmployeesArray_WithNullsLast));
//
// System.out.println("sortedEmployeesByNameAge");
// System.out.println(Arrays.toString(sortedEmployeesByNameAge));
//
// System.out.println("someMoreEmployees");
// System.out.println(Arrays.toString(someMoreEmployees));
//
}
}
}