Skip to content

Commit

Permalink
🔥 Remove Comparable interface from Speaker (no need)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Fihlon <[email protected]>
  • Loading branch information
McPringle committed Sep 26, 2024
1 parent 9458577 commit 0ef791a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
9 changes: 1 addition & 8 deletions src/main/java/swiss/fihlon/apus/event/Speaker.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,4 @@

import org.jetbrains.annotations.NotNull;

public record Speaker(@NotNull String fullName) implements Comparable<Speaker> {

@Override
public int compareTo(@NotNull final Speaker other) {
return fullName.compareTo(other.fullName);
}

}
public record Speaker(@NotNull String fullName) { }
7 changes: 0 additions & 7 deletions src/test/java/swiss/fihlon/apus/event/SpeakerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,6 @@

class SpeakerTest {

@Test
void compareTo() {
assertEquals(-1, new Speaker("Speaker 1").compareTo(new Speaker("Speaker 2")));
assertEquals(0, new Speaker("Speaker 1").compareTo(new Speaker("Speaker 1")));
assertEquals(1, new Speaker("Speaker 2").compareTo(new Speaker("Speaker 1")));
}

@Test
void fullName() {
assertEquals("Speaker 1", new Speaker("Speaker 1").fullName());
Expand Down

0 comments on commit 0ef791a

Please sign in to comment.