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

Does this best practice? #184

Unanswered
kolomiec asked this question in Q&A
Discussion options

java-fundamentals-exercises/0-0-intro/src/test/java/com/bobocode/intro/ExerciseIntroductionTest.java

Line 26 in c6617fa

private String EXPECTED_MESSAGE = "The key to efficient learning is practice!";
For me this var make coupling between tests, what do you think about it?

Also, just wondering, regarding this test class, why do you need to crazy logic in the com.bobocode.intro.ExerciseIntroductionTest#encodeMessageReturnsCorrectPhrase? Vs just
assertEquals(exerciseIntroduction.encodeMessage(EXPECTED_MESSAGE), "VGhlIGtleSB0byBlZmZpY2llbnQgbGVhcm5pbmcgaXMgcHJhY3RpY2Uh");

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

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