Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2aff040

Browse files
committed
GP-24 Update pom and text names in CrazyStreamsTest.java
1 parent 1baec88 commit 2aff040

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

‎6-0-functional-programming/src/test/java/com/bobocode/streams/CrazyStreamsTest.java

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.bobocode.streams;
22

3-
import com.bobocode.streams.exception.EntityNotFoundException;
43
import com.bobocode.model.Account;
54
import com.bobocode.model.Sex;
5+
import com.bobocode.streams.exception.EntityNotFoundException;
66
import org.junit.jupiter.api.*;
77

88
import java.math.BigDecimal;
@@ -16,7 +16,7 @@
1616
* The helper method of this test class do not use Stream API intentionally. You should try to find a stream-based
1717
* solutions for {@link CrazyStreams} by yourself.
1818
*/
19-
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
19+
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
2020
public class CrazyStreamsTest {
2121

2222
private CrazyStreams streams;
@@ -38,26 +38,26 @@ void setUp() {
3838
}
3939

4040
@Test
41-
@Order(1)
42-
void testFindRichestPerson() {
41+
@Order(1)
42+
void findRichestPerson() {
4343
Optional<Account> expectedPerson = Optional.of(accounts.get(0));
4444
Optional<Account> actualRichestPerson = streams.findRichestPerson();
4545

4646
assertEquals(expectedPerson, actualRichestPerson);
4747
}
4848

4949
@Test
50-
@Order(2)
51-
void testFindAccountsByBirthdayMonth() {
50+
@Order(2)
51+
void findAccountsByBirthdayMonth() {
5252
List<Account> expectedList = getExpectedList();
5353
List<Account> aprilAccounts = streams.findAccountsByBirthdayMonth(Month.APRIL);
5454

5555
assertEquals(expectedList, aprilAccounts);
5656
}
5757

5858
@Test
59-
@Order(3)
60-
void testSeparateMaleAccounts() {
59+
@Order(3)
60+
void separateMaleAccounts() {
6161
Map<Boolean, List<Account>> expectedAccountMap = getExpectedMaleMap();
6262
Map<Boolean, List<Account>> maleToAccountsMap = streams.partitionMaleAccounts();
6363

@@ -76,8 +76,8 @@ private List<Account> getExpectedList() {
7676
}
7777

7878
@Test
79-
@Order(4)
80-
void testGroupAccountsByEmailDomain() {
79+
@Order(4)
80+
void groupAccountsByEmailDomain() {
8181
Map<String, List<Account>> expectedEmailMap = getExpectedEmailMap();
8282
Map<String, List<Account>> emailDomainToAccountsMap = streams.groupAccountsByEmailDomain();
8383

@@ -94,25 +94,25 @@ private Map<String, List<Account>> getExpectedEmailMap() {
9494
}
9595

9696
@Test
97-
@Order(5)
98-
void testGetNumOfLettersInFirstAndLastNames() {
97+
@Order(5)
98+
void getNumOfLettersInFirstAndLastNames() {
9999
int numOfLettersInFirstAndLastNames = streams.getNumOfLettersInFirstAndLastNames();
100100

101101
assertEquals(47, numOfLettersInFirstAndLastNames);
102102
}
103103

104104
@Test
105-
@Order(6)
106-
void testCalculateTotalBalance() {
105+
@Order(6)
106+
void calculateTotalBalance() {
107107
BigDecimal totalBalance = streams.calculateTotalBalance();
108108

109109
assertEquals(BigDecimal.valueOf(241864), totalBalance);
110110
}
111111

112112

113113
@Test
114-
@Order(7)
115-
void testSortByFirstAndLastNames() {
114+
@Order(7)
115+
void sortByFirstAndLastNames() {
116116
List<Account> sortedList = streams.sortByFirstAndLastNames();
117117

118118
assertEquals(1L, sortedList.get(0).getId().longValue());
@@ -123,25 +123,25 @@ void testSortByFirstAndLastNames() {
123123
}
124124

125125
@Test
126-
@Order(8)
127-
void testContainsAccountWithEmailDomain() {
126+
@Order(8)
127+
void containsAccountWithEmailDomain() {
128128
assertTrue(streams.containsAccountWithEmailDomain("gmail.com"));
129129
assertTrue(streams.containsAccountWithEmailDomain("yahoo.com"));
130130
assertFalse(streams.containsAccountWithEmailDomain("ukr.net"));
131131
}
132132

133133
@Test
134-
@Order(9)
135-
void testGetBalanceByEmail() {
134+
@Order(9)
135+
void getBalanceByEmail() {
136136
Account account = accounts.get(1);
137137
BigDecimal balance = streams.getBalanceByEmail(account.getEmail());
138138

139139
assertEquals(account.getBalance(), balance);
140140
}
141141

142142
@Test
143-
@Order(10)
144-
void testGetBalanceByEmailThrowsException() {
143+
@Order(10)
144+
void getBalanceByEmailThrowsException() {
145145
String fakeEmail = "fake@mail.com";
146146
try {
147147
streams.getBalanceByEmail(fakeEmail);
@@ -153,8 +153,8 @@ void testGetBalanceByEmailThrowsException() {
153153
}
154154

155155
@Test
156-
@Order(11)
157-
void testCollectAccountsById() {
156+
@Order(11)
157+
void collectAccountsById() {
158158
Map<Long, Account> idToAccountMap = streams.collectAccountsById();
159159

160160
assertEquals(accounts.get(0), idToAccountMap.get(1L));
@@ -164,8 +164,8 @@ void testCollectAccountsById() {
164164
}
165165

166166
@Test
167-
@Order(12)
168-
void testCollectBalancesByEmailForAccountsCreatedOn() {
167+
@Order(12)
168+
void collectBalancesByEmailForAccountsCreatedOn() {
169169
Account account = accounts.get(3);
170170

171171
Map<String, BigDecimal> emailToBalanceMap = streams.collectBalancesByEmailForAccountsCreatedOn(account.getCreationDate().getYear());
@@ -174,8 +174,8 @@ void testCollectBalancesByEmailForAccountsCreatedOn() {
174174
}
175175

176176
@Test
177-
@Order(13)
178-
void testGroupFirstNamesByLastNames() {
177+
@Order(13)
178+
void groupFirstNamesByLastNames() {
179179
Map<String, Set<String>> lastToFirstNamesMap = streams.groupFirstNamesByLastNames();
180180

181181
assertEquals(4, lastToFirstNamesMap.size());
@@ -186,8 +186,8 @@ void testGroupFirstNamesByLastNames() {
186186
}
187187

188188
@Test
189-
@Order(14)
190-
void testGroupCommaSeparatedFirstNamesByBirthdayMonth() {
189+
@Order(14)
190+
void groupCommaSeparatedFirstNamesByBirthdayMonth() {
191191
Map<Month, String> birthdayMonthToFirstNamesMap = streams.groupCommaSeparatedFirstNamesByBirthdayMonth();
192192

193193
assertEquals(3, birthdayMonthToFirstNamesMap.size());
@@ -197,8 +197,8 @@ void testGroupCommaSeparatedFirstNamesByBirthdayMonth() {
197197
}
198198

199199
@Test
200-
@Order(15)
201-
void testGroupTotalBalanceByCreationMonth() {
200+
@Order(15)
201+
void groupTotalBalanceByCreationMonth() {
202202
Map<Month, BigDecimal> totalBalanceByAccountCreationMonth = streams.groupTotalBalanceByCreationMonth();
203203

204204
assertEquals(2, totalBalanceByAccountCreationMonth.size());
@@ -207,8 +207,8 @@ void testGroupTotalBalanceByCreationMonth() {
207207
}
208208

209209
@Test
210-
@Order(16)
211-
void testGetCharacterFrequencyInFirstNames() {
210+
@Order(16)
211+
void getCharacterFrequencyInFirstNames() {
212212
Map<Character, Long> characterFrequencyInFirstAndLastNames = streams.getCharacterFrequencyInFirstNames();
213213

214214
assertEquals(3, characterFrequencyInFirstAndLastNames.get('a').longValue());
@@ -221,8 +221,8 @@ void testGetCharacterFrequencyInFirstNames() {
221221
}
222222

223223
@Test
224-
@Order(17)
225-
void testGetCharacterFrequencyIgnoreCaseInFirstAndLastNames() {
224+
@Order(17)
225+
void getCharacterFrequencyIgnoreCaseInFirstAndLastNames() {
226226
Map<Character, Long> characterFrequencyInFirstAndLastNames = streams.getCharacterFrequencyIgnoreCaseInFirstAndLastNames();
227227

228228
assertEquals(6, characterFrequencyInFirstAndLastNames.get('a').longValue());

‎pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<module>9-0-clean-code</module>
2929
<module>java-fundamentals-util</module>
3030
</modules>
31-
31+
3232
<dependencies>
3333
<dependency>
3434
<groupId>org.junit.jupiter</groupId>
@@ -48,13 +48,13 @@
4848
<dependency>
4949
<groupId>org.mockito</groupId>
5050
<artifactId>mockito-core</artifactId>
51-
<version>3.0.0</version>
51+
<version>3.6.28</version>
5252
<scope>test</scope>
5353
</dependency>
5454
<dependency>
5555
<groupId>org.mockito</groupId>
5656
<artifactId>mockito-inline</artifactId>
57-
<version>3.0.0</version>
57+
<version>3.6.28</version>
5858
<scope>test</scope>
5959
</dependency>
6060
</dependencies>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /