Skip to content

Commit

Permalink
refactor: remove public from test methods
Browse files Browse the repository at this point in the history
jUnit5 supports tests methods without a public keyword. By convention we want methods to be scope as small as possible. We should also adhere to this in our test classes.
  • Loading branch information
remcowesterhoud committed Feb 24, 2022
1 parent 81d49c8 commit 213d96f
Show file tree
Hide file tree
Showing 19 changed files with 227 additions and 227 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ class EngineClientTest {
private ZeebeClient zeebeClient;

@BeforeEach
public void setupGrpcServer() {
void setupGrpcServer() {
zeebeEngine = EngineFactory.create();
zeebeEngine.start();
zeebeClient = zeebeEngine.createClient();
}

@AfterEach
public void tearDown() {
void tearDown() {
zeebeEngine.stop();
zeebeClient.close();
}

@Test
public void shouldRequestTopology() {
void shouldRequestTopology() {
// given

// when
Expand All @@ -89,7 +89,7 @@ public void shouldRequestTopology() {
}

@Test
public void shouldUseBuiltInClient() {
void shouldUseBuiltInClient() {
// given

// when
Expand All @@ -100,7 +100,7 @@ public void shouldUseBuiltInClient() {
}

@Test
public void shouldUseGatewayAddressToBuildClient() {
void shouldUseGatewayAddressToBuildClient() {
// given
final ZeebeClient client =
ZeebeClient.newClientBuilder()
Expand All @@ -117,7 +117,7 @@ public void shouldUseGatewayAddressToBuildClient() {
}

@Test
public void shouldPublishMessage() {
void shouldPublishMessage() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -156,7 +156,7 @@ public void shouldPublishMessage() {
}

@Test
public void shouldDeployProcess() {
void shouldDeployProcess() {
// given

// when
Expand All @@ -182,7 +182,7 @@ public void shouldDeployProcess() {
}

@Test
public void shouldCreateInstanceWithoutVariables() {
void shouldCreateInstanceWithoutVariables() {
// given
final DeploymentEvent deployment =
zeebeClient
Expand Down Expand Up @@ -211,7 +211,7 @@ public void shouldCreateInstanceWithoutVariables() {
}

@Test
public void shouldRejectCommand() {
void shouldRejectCommand() {
// given

// when
Expand All @@ -226,7 +226,7 @@ public void shouldRejectCommand() {
}

@Test
public void shouldCreateProcessInstance() {
void shouldCreateProcessInstance() {
// given
final DeploymentEvent deployment =
zeebeClient
Expand Down Expand Up @@ -256,7 +256,7 @@ public void shouldCreateProcessInstance() {
}

@Test
public void shouldCancelProcessInstance() {
void shouldCancelProcessInstance() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -299,7 +299,7 @@ public void shouldCancelProcessInstance() {
}

@Test
public void shouldUpdateVariablesOnProcessInstance() {
void shouldUpdateVariablesOnProcessInstance() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -337,7 +337,7 @@ public void shouldUpdateVariablesOnProcessInstance() {
}

@Test
public void shouldCreateProcessInstanceWithResult() {
void shouldCreateProcessInstanceWithResult() {
// given
final DeploymentEvent deployment =
zeebeClient
Expand Down Expand Up @@ -369,7 +369,7 @@ public void shouldCreateProcessInstanceWithResult() {
}

@Test
public void shouldActivateJob() {
void shouldActivateJob() {
// given
final DeploymentEvent deployment =
zeebeClient
Expand Down Expand Up @@ -423,7 +423,7 @@ public void shouldActivateJob() {
}

@Test
public void shouldCompleteJob() {
void shouldCompleteJob() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -460,7 +460,7 @@ public void shouldCompleteJob() {
}

@Test
public void shouldFailJob() {
void shouldFailJob() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -527,7 +527,7 @@ public void shouldFailJob() {
}

@Test
public void shouldThrowErrorOnJob() {
void shouldThrowErrorOnJob() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -600,7 +600,7 @@ public void shouldThrowErrorOnJob() {
}

@Test
public void shouldUpdateRetiresOnJob() {
void shouldUpdateRetiresOnJob() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -661,7 +661,7 @@ public void shouldUpdateRetiresOnJob() {
}

@Test
public void shouldReadProcessInstanceRecords() {
void shouldReadProcessInstanceRecords() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -719,7 +719,7 @@ public void shouldReadProcessInstanceRecords() {
}

@Test
public void shouldPrintRecords() {
void shouldPrintRecords() {
// given
zeebeClient
.newDeployCommand()
Expand Down Expand Up @@ -756,7 +756,7 @@ public void shouldPrintRecords() {
}

@Test
public void shouldIncreaseTheTime() {
void shouldIncreaseTheTime() {
// given
zeebeClient
.newDeployCommand()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public final class DbStringColumnFamilyTest {
private DbString value;

@BeforeEach
public void setup() {
void setup() {
zeebeDb = dbFactory.createDb();

key = new DbString();
Expand All @@ -39,7 +39,7 @@ public void setup() {
}

@Test
public void shouldPutValue() {
void shouldPutValue() {
// given
key.wrapString("foo");
value.wrapString("baring");
Expand All @@ -59,7 +59,7 @@ public void shouldPutValue() {
}

@Test
public void shouldUseForeachValue() {
void shouldUseForeachValue() {
// given
putKeyValuePair("foo", "baring");
putKeyValuePair("this is the one", "as you know");
Expand All @@ -76,7 +76,7 @@ public void shouldUseForeachValue() {
}

@Test
public void shouldUseForeachPair() {
void shouldUseForeachPair() {
// given
putKeyValuePair("foo", "baring");
putKeyValuePair("this is the one", "as you know");
Expand All @@ -99,7 +99,7 @@ public void shouldUseForeachPair() {
}

@Test
public void shouldUseWhileTrue() {
void shouldUseWhileTrue() {
// given
putKeyValuePair("foo", "baring");
putKeyValuePair("this is the one", "as you know");
Expand All @@ -124,7 +124,7 @@ public void shouldUseWhileTrue() {
}

@Test
public void shouldUseWhileEqualPrefix() {
void shouldUseWhileEqualPrefix() {
// given
putKeyValuePair("foo", "baring");
putKeyValuePair("this is the one", "as you know");
Expand Down Expand Up @@ -154,7 +154,7 @@ public void shouldUseWhileEqualPrefix() {
}

@Test
public void shouldUseWhileEqualPrefixLikeGet() {
void shouldUseWhileEqualPrefixLikeGet() {
// given
putKeyValuePair("foo", "baring");
putKeyValuePair("this is the one", "as you know");
Expand All @@ -181,7 +181,7 @@ public void shouldUseWhileEqualPrefixLikeGet() {
}

@Test
public void shouldAllowSingleNestedWhileEqualPrefix() {
void shouldAllowSingleNestedWhileEqualPrefix() {
// given
putKeyValuePair("and", "be good");
key.wrapString("and");
Expand All @@ -197,7 +197,7 @@ public void shouldAllowSingleNestedWhileEqualPrefix() {
}

@Test
public void shouldThrowExceptionOnMultipleNestedWhileEqualPrefix() {
void shouldThrowExceptionOnMultipleNestedWhileEqualPrefix() {
// given
putKeyValuePair("and", "be good");
key.wrapString("and");
Expand Down
Loading

0 comments on commit 213d96f

Please sign in to comment.