Skip to content

Commit

Permalink
#1142 comments removed from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Aug 22, 2022
1 parent dddac7b commit 91d020c
Show file tree
Hide file tree
Showing 169 changed files with 0 additions and 1,784 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ public final class AppITCase {
*/
private static final String HOME = System.getProperty("takes.home");

/**
* App can work.
* @throws Exception If some problem inside
* @checkstyle NonStaticMethodCheck (2 lines)
*/
@Test
public void justWorks() throws Exception {
Assertions.assertNotNull(AppITCase.HOME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
*/
public final class AppTest {

/**
* App can work.
* @param temp Temporal directory
* @throws Exception If some problem inside
*/
@Test
public void justWorks(@TempDir final Path temp) throws Exception {
final File dir = temp.toFile();
Expand Down
3 changes: 0 additions & 3 deletions src/test/java/org/takes/facets/auth/IdentityTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
*/
final class IdentityTest {

/**
* Identity.ANONYMOUS can be equal to itself.
*/
@Test
void equalsToItself() {
MatcherAssert.assertThat(
Expand Down
30 changes: 0 additions & 30 deletions src/test/java/org/takes/facets/auth/PsAllTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
*/
final class PsAllTest {

/**
* Fails if PsAll with 0 Passes is created.
*/
@Test
void thereShouldBeAtLeastOnePass() {
Assertions.assertThrows(
Expand All @@ -58,9 +55,6 @@ void thereShouldBeAtLeastOnePass() {
);
}

/**
* Fails if index is less then 0.
*/
@Test
void indexMustBeNonNegative() {
Assertions.assertThrows(
Expand All @@ -75,9 +69,6 @@ void indexMustBeNonNegative() {
);
}

/**
* Fails if index is greater or equal to the number of Passes to enter.
*/
@Test
void indexMustBeSmallEnough() {
Assertions.assertThrows(
Expand All @@ -95,10 +86,6 @@ void indexMustBeSmallEnough() {
);
}

/**
* PsAll with a single Pass that can be entered should succeed.
* @throws Exception If fails
*/
@Test
void testOneSuccessfull() throws Exception {
MatcherAssert.assertThat(
Expand All @@ -110,10 +97,6 @@ void testOneSuccessfull() throws Exception {
);
}

/**
* Fail with only one failure test.
* @throws Exception if exception
*/
@Test
void testOneFail() throws Exception {
MatcherAssert.assertThat(
Expand All @@ -125,11 +108,6 @@ void testOneFail() throws Exception {
);
}

/**
* PsAll with multiple passes that all can be entered returns the
* identity specified by an index.
* @throws Exception If fails
*/
@Test
void testSuccessfullIdx() throws Exception {
final Pass resulting = new PsFixed(
Expand All @@ -150,10 +128,6 @@ void testSuccessfullIdx() throws Exception {
);
}

/**
* Fail if one of Pass fails.
* @throws Exception if exception
*/
@Test
void testFail() throws Exception {
MatcherAssert.assertThat(
Expand All @@ -170,10 +144,6 @@ void testFail() throws Exception {
);
}

/**
* Exits.
* @throws Exception If fails
*/
@Test
void exits() throws Exception {
final Response response = new RsEmpty();
Expand Down
20 changes: 0 additions & 20 deletions src/test/java/org/takes/facets/auth/PsBasicDefaultTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
*/
final class PsBasicDefaultTest {

/**
* PsBasic.Default can accept a correct login/password pair.
*/
@Test
void acceptsCorrectLoginPasswordPair() {
MatcherAssert.assertThat(
Expand All @@ -56,10 +53,6 @@ void acceptsCorrectLoginPasswordPair() {
);
}

/**
* PsBasic.Default can handle both <pre>%20</pre> and <pre>+</pre>
* variants of encoding spaces in constructor parameters.
*/
@Test
void supportsBothKindsOfSpace() {
MatcherAssert.assertThat(
Expand Down Expand Up @@ -90,9 +83,6 @@ void supportsBothKindsOfSpace() {
);
}

/**
* PsBasic.Default can be entered by a user with a space in his name.
*/
@Test
void supportsUsersWithSpacesInTheirNames() {
MatcherAssert.assertThat(
Expand All @@ -110,10 +100,6 @@ void supportsUsersWithSpacesInTheirNames() {
);
}

/**
* PsBasic.Default can url-decode an urn from its parameter.
* @throws Exception If fails
*/
@Test
void supportsUrlencodedUrns() throws Exception {
final String urn = "urn:a100%25:one-two+";
Expand All @@ -136,9 +122,6 @@ void supportsUrlencodedUrns() throws Exception {
);
}

/**
* PsBasic.Default can reject incorrect password.
*/
@Test
void rejectsIncorrectPassword() {
MatcherAssert.assertThat(
Expand All @@ -154,9 +137,6 @@ void rejectsIncorrectPassword() {
);
}

/**
* PsBasic.Default can reject a non-existing login.
*/
@Test
void rejectsIncorrectLogin() {
MatcherAssert.assertThat(
Expand Down
28 changes: 0 additions & 28 deletions src/test/java/org/takes/facets/auth/PsBasicTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ final class PsBasicTest {
*/
private static final String VALID_CODE = "?valid_code=%s";

/**
* PsBasic can handle connection with valid credential.
* @throws Exception if any error occurs
*/
@Test
void handleConnectionWithValidCredential() throws Exception {
final String user = "john";
Expand All @@ -91,11 +87,6 @@ void handleConnectionWithValidCredential() throws Exception {
);
}

/**
* PsBasic can handle connection with valid credential when Entry is
* a instance of Default.
* @throws Exception if any error occurs
*/
@Test
void handleConnectionWithValidCredentialDefaultEntry()
throws Exception {
Expand Down Expand Up @@ -126,10 +117,6 @@ void handleConnectionWithValidCredentialDefaultEntry()
);
}

/**
* PsBasic can handle connection with invalid credential.
* @throws Exception If some problem inside
*/
@Test
void handleConnectionWithInvalidCredential() throws Exception {
RsForward forward = new RsForward();
Expand Down Expand Up @@ -163,10 +150,6 @@ void handleConnectionWithInvalidCredential() throws Exception {
);
}

/**
* PsBasic can handle multiple headers with valid credential.
* @throws Exception If some problem inside
*/
@Test
void handleMultipleHeadersWithValidCredential() throws Exception {
final String user = "bill";
Expand Down Expand Up @@ -197,9 +180,6 @@ void handleMultipleHeadersWithValidCredential() throws Exception {
);
}

/**
* PsBasic can handle multiple headers with invalid content.
*/
@Test
void handleMultipleHeadersWithInvalidContent() {
Assertions.assertThrows(
Expand Down Expand Up @@ -230,10 +210,6 @@ void handleMultipleHeadersWithInvalidContent() {
);
}

/**
* PsBasic can authenticate a user.
* @throws Exception If some problem inside
*/
@Test
void authenticatesUser() throws Exception {
final Take take = new TkAuth(
Expand All @@ -259,10 +235,6 @@ void authenticatesUser() throws Exception {
).affirm();
}

/**
* PsBasic can request authentication.
* @throws Exception If some problem inside
*/
@Test
void requestAuthentication() throws Exception {
final Take take = new TkForward(
Expand Down
14 changes: 0 additions & 14 deletions src/test/java/org/takes/facets/auth/PsByFlagTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
* @since 0.10
*/
final class PsByFlagTest {
/**
* PsByFlag can skip if nothing found.
* @throws Exception If some problem inside
*/
@Test
void skipsIfNothingFound() throws Exception {
MatcherAssert.assertThat(
Expand All @@ -64,10 +60,6 @@ void skipsIfNothingFound() throws Exception {
);
}

/**
* PsByFlag finds flag and authenticates user.
* @throws Exception If some problem inside
*/
@Test
void flagIsFoundUserAuthenticated() throws Exception {
MatcherAssert.assertThat(
Expand All @@ -81,9 +73,6 @@ void flagIsFoundUserAuthenticated() throws Exception {
);
}

/**
* PsByFlag wraps response with authenticated user.
*/
@Test
@SuppressWarnings("unchecked")
void exitTest() {
Expand All @@ -106,9 +95,6 @@ void exitTest() {
);
}

/**
* Checks PsByFlag equals method.
*/
@Test
void mustEvaluateTrueEqualityTest() {
final Map<Pattern, Pass> passes = new HashMap<>(1);
Expand Down
8 changes: 0 additions & 8 deletions src/test/java/org/takes/facets/auth/PsChainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@
*/
final class PsChainTest {

/**
* PsChain returns proper identity.
* @throws Exception if some problems inside
*/
@Test
void chainExecutionTest() throws Exception {
MatcherAssert.assertThat(
Expand All @@ -51,10 +47,6 @@ void chainExecutionTest() throws Exception {
);
}

/**
* PsChain returns proper response.
* @throws Exception if some problems inside
*/
@Test
void exitChainTest() throws Exception {
MatcherAssert.assertThat(
Expand Down
4 changes: 0 additions & 4 deletions src/test/java/org/takes/facets/auth/PsCookieTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
*/
final class PsCookieTest {

/**
* PsCookie can add a cookie.
* @throws IOException If some problem inside
*/
@Test
void addsCookieToResponse() throws IOException {
new Assertion<>(
Expand Down
4 changes: 0 additions & 4 deletions src/test/java/org/takes/facets/auth/RqAuthTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
*/
final class RqAuthTest {

/**
* RqAuth can return identity.
* @throws IOException If some problem inside
*/
@Test
void returnsIdentity() throws IOException {
final Identity.Simple identity = new Identity.Simple("urn:test:1");
Expand Down
16 changes: 0 additions & 16 deletions src/test/java/org/takes/facets/auth/TkAuthTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@
*/
final class TkAuthTest {

/**
* TkAuth can login a user.
* @throws Exception If some problem inside
*/
@Test
void logsUserIn() throws Exception {
final Pass pass = new PsFixed(new Identity.Simple("urn:test:1"));
Expand All @@ -72,10 +68,6 @@ void logsUserIn() throws Exception {
);
}

/**
* TkAuth can login a user via cookie.
* @throws Exception If some problem inside
*/
@Test
@SuppressWarnings("unchecked")
void logsInUserViaCookie() throws Exception {
Expand Down Expand Up @@ -108,10 +100,6 @@ void logsInUserViaCookie() throws Exception {
).affirm();
}

/**
* TkAuth can logout a user.
* @throws Exception If some problem inside
*/
@Test
void logsUserOut() throws Exception {
final Pass pass = new PsLogout();
Expand All @@ -136,10 +124,6 @@ void logsUserOut() throws Exception {
);
}

/**
* TkAuth can logout a user when a login cookie is present.
* @throws Exception If some problem inside
*/
@Test
void logsUserOutWithCookiePresent() throws Exception {
new Assertion<>(
Expand Down
Loading

3 comments on commit 91d020c

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 91d020c Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 877-052482c8 disappeared from src/test/java/org/takes/facets/auth/codecs/CcStrictTest.java), that's why I closed #895. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 91d020c Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 893-3412ae8c disappeared from src/test/java/org/takes/facets/hamcrest/HmBodyTest.java), that's why I closed #948. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 91d020c Aug 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 997-5bcbe378 disappeared from src/test/java/org/takes/rq/multipart/CopyBytesUntilBoundaryTest.java), that's why I closed #1108. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

Please sign in to comment.