Skip to content

Commit 56207e2

Browse files
O-Link06aaccioly
authored andcommitted
Add testcase for toString
1 parent 8aaca76 commit 56207e2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.gildedrose;
2+
3+
import org.junit.jupiter.api.DisplayName;
4+
import org.junit.jupiter.api.Test;
5+
6+
import static org.assertj.core.api.Assertions.assertThat;
7+
8+
class ItemTest {
9+
10+
private final Item normalItem = new Item("Foo", 10, 20);
11+
12+
@DisplayName("toString prints name and quality")
13+
@Test
14+
void testToString() {
15+
assertThat(normalItem.toString()).isEqualTo("Foo, 10, 20");
16+
}
17+
}

0 commit comments

Comments
 (0)