Cosmetics (because the test is trivial).
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
Manuel Friedli 2022-02-02 00:53:42 +01:00
parent 28c78325fe
commit 67c07ff2ce
Signed by: manuel
GPG key ID: 41D08ABA75634DA1
2 changed files with 15 additions and 1 deletions

View file

@ -2,12 +2,14 @@ package ch.fritteli.labyrinth.generator.renderer.text;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.experimental.FieldDefaults; import lombok.experimental.FieldDefaults;
@AllArgsConstructor
@EqualsAndHashCode
@FieldDefaults(level = AccessLevel.PRIVATE) @FieldDefaults(level = AccessLevel.PRIVATE)
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor
class CharDefinition { class CharDefinition {
// //
static final String HORIZONTAL = "\u2500"; static final String HORIZONTAL = "\u2500";

View file

@ -44,4 +44,16 @@ class CharDefinitionTest {
assertEquals("", new CharDefinition(true, true, true, false, true).toString()); assertEquals("", new CharDefinition(true, true, true, false, true).toString());
assertEquals("", new CharDefinition(true, true, true, true, true).toString()); assertEquals("", new CharDefinition(true, true, true, true, true).toString());
} }
@Test
void testBuilderMethods() {
assertEquals(new CharDefinition(true, false, false, false, false), new CharDefinition().up());
assertEquals(new CharDefinition(false, true, false, false, false), new CharDefinition().down());
assertEquals(new CharDefinition(false, false, true, false, false), new CharDefinition().left());
assertEquals(new CharDefinition(false, false, false, true, false), new CharDefinition().right());
assertEquals(new CharDefinition(false, false, false, false, true), new CharDefinition().solution());
assertEquals(new CharDefinition(true, true, false, false, false), new CharDefinition().vertical());
assertEquals(new CharDefinition(false, false, true, true, false), new CharDefinition().horizontal());
assertEquals(new CharDefinition(true, true, true, true, true), new CharDefinition().vertical().horizontal().solution());
}
} }