Skip to content

Instantly share code, notes, and snippets.

@SDiamante13
Created July 27, 2022 20:58
Show Gist options
  • Select an option

  • Save SDiamante13/6a5c74d409e03796db370a8a6d9b1b63 to your computer and use it in GitHub Desktop.

Select an option

Save SDiamante13/6a5c74d409e03796db370a8a6d9b1b63 to your computer and use it in GitHub Desktop.
Do the simplest thing to make the test pass.
package tech.pathtoprogramming.tdd;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
class AYearShould {
@Test
void determineThatTheYearIsNotALeapYearForCommonCase() {
boolean isLeapYear = Year.isLeapYear(2001);
assertThat(isLeapYear).isEqualTo(false);
}
}
class Year {
public static boolean isLeapYear(int year) {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment