Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
Expand All @@ -10,6 +11,7 @@
public class FlowerFieldBoardTest {

@Test
@DisplayName("no rows")
public void testInputBoardWithNoRowsAndNoColumns() {
List<String> inputBoard = Collections.emptyList();
List<String> expectedNumberedBoard = Collections.emptyList();
Expand All @@ -20,6 +22,7 @@ public void testInputBoardWithNoRowsAndNoColumns() {

@Disabled("Remove to run test")
@Test
@DisplayName("no columns")
public void testInputBoardWithOneRowAndNoColumns() {
List<String> inputBoard = Collections.singletonList("");
List<String> expectedNumberedBoard = Collections.singletonList("");
Expand All @@ -30,6 +33,7 @@ public void testInputBoardWithOneRowAndNoColumns() {

@Disabled("Remove to run test")
@Test
@DisplayName("no flowers")
public void testInputBoardWithNoFlowers() {
List<String> inputBoard = Arrays.asList(
" ",
Expand All @@ -50,6 +54,7 @@ public void testInputBoardWithNoFlowers() {

@Disabled("Remove to run test")
@Test
@DisplayName("garden full of flowers")
public void testInputBoardWithOnlyFlowers() {
List<String> inputBoard = Arrays.asList(
"***",
Expand All @@ -70,6 +75,7 @@ public void testInputBoardWithOnlyFlowers() {

@Disabled("Remove to run test")
@Test
@DisplayName("flower surrounded by spaces")
public void testInputBoardWithSingleFlowerAtCenter() {
List<String> inputBoard = Arrays.asList(
" ",
Expand All @@ -90,6 +96,7 @@ public void testInputBoardWithSingleFlowerAtCenter() {

@Disabled("Remove to run test")
@Test
@DisplayName("space surrounded by flowers")
public void testInputBoardWithFlowersAroundPerimeter() {
List<String> inputBoard = Arrays.asList(
"***",
Expand All @@ -110,6 +117,7 @@ public void testInputBoardWithFlowersAroundPerimeter() {

@Disabled("Remove to run test")
@Test
@DisplayName("horizontal line")
public void testInputBoardWithSingleRowAndTwoFlowers() {
List<String> inputBoard = Collections.singletonList(
" * * "
Expand All @@ -126,6 +134,7 @@ public void testInputBoardWithSingleRowAndTwoFlowers() {

@Disabled("Remove to run test")
@Test
@DisplayName("horizontal line, flowers at edges")
public void testInputBoardWithSingleRowAndTwoFlowersAtEdges() {
List<String> inputBoard = Collections.singletonList(
"* *"
Expand All @@ -142,6 +151,7 @@ public void testInputBoardWithSingleRowAndTwoFlowersAtEdges() {

@Disabled("Remove to run test")
@Test
@DisplayName("vertical line")
public void testInputBoardWithSingleColumnAndTwoFlowers() {
List<String> inputBoard = Arrays.asList(
" ",
Expand All @@ -166,6 +176,7 @@ public void testInputBoardWithSingleColumnAndTwoFlowers() {

@Disabled("Remove to run test")
@Test
@DisplayName("vertical line, flowers at edges")
public void testInputBoardWithSingleColumnAndTwoFlowersAtEdges() {
List<String> inputBoard = Arrays.asList(
"*",
Expand All @@ -190,6 +201,7 @@ public void testInputBoardWithSingleColumnAndTwoFlowersAtEdges() {

@Disabled("Remove to run test")
@Test
@DisplayName("cross")
public void testInputBoardWithFlowersInCross() {
List<String> inputBoard = Arrays.asList(
" * ",
Expand All @@ -214,6 +226,7 @@ public void testInputBoardWithFlowersInCross() {

@Disabled("Remove to run test")
@Test
@DisplayName("large garden")
public void testLargeInputBoard() {
List<String> inputBoard = Arrays.asList(
" * * ",
Expand Down
11 changes: 11 additions & 0 deletions exercises/practice/food-chain/src/test/java/FoodChainTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
Expand All @@ -13,6 +14,7 @@ public void setup() {
}

@Test
@DisplayName("fly")
public void fly() {
int verse = 1;
String expected = "I know an old lady who swallowed a fly.\n" +
Expand All @@ -23,6 +25,7 @@ public void fly() {

@Test
@Disabled("Remove to run test.")
@DisplayName("spider")
public void spider() {
int verse = 2;
String expected = "I know an old lady who swallowed a spider.\n" +
Expand All @@ -35,6 +38,7 @@ public void spider() {

@Test
@Disabled("Remove to run test.")
@DisplayName("bird")
public void bird() {
int verse = 3;
String expected = "I know an old lady who swallowed a bird.\n" +
Expand All @@ -49,6 +53,7 @@ public void bird() {

@Test
@Disabled("Remove to run test.")
@DisplayName("cat")
public void cat() {
int verse = 4;
String expected = "I know an old lady who swallowed a cat.\n" +
Expand All @@ -65,6 +70,7 @@ public void cat() {

@Test
@Disabled("Remove to run test.")
@DisplayName("dog")
public void dog() {
int verse = 5;
String expected = "I know an old lady who swallowed a dog.\n" +
Expand All @@ -81,6 +87,7 @@ public void dog() {

@Test
@Disabled("Remove to run test.")
@DisplayName("goat")
public void goat() {
int verse = 6;
String expected = "I know an old lady who swallowed a goat.\n" +
Expand All @@ -98,6 +105,7 @@ public void goat() {

@Test
@Disabled("Remove to run test.")
@DisplayName("cow")
public void cow() {
int verse = 7;
String expected = "I know an old lady who swallowed a cow.\n" +
Expand All @@ -116,6 +124,7 @@ public void cow() {

@Test
@Disabled("Remove to run test.")
@DisplayName("horse")
public void horse() {
int verse = 8;
String expected = "I know an old lady who swallowed a horse.\n" +
Expand All @@ -127,6 +136,7 @@ public void horse() {

@Test
@Disabled("Remove to run test.")
@DisplayName("multiple verses")
public void multipleVerses() {
int startVerse = 1;
int endVerse = 3;
Expand All @@ -151,6 +161,7 @@ public void multipleVerses() {

@Test
@Disabled("Remove to run test.")
@DisplayName("full song")
public void wholeSong() {
int startVerse = 1;
int endVerse = 8;
Expand Down
Loading