package se.ericthelin.fractions;

import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

public class GreatestCommonDivisorTest {

	@Test
	public void returnsFirstWhenSecondIsZero() {
		assertThat(GreatestCommonDivisor.of(6, 0), is(6));
	}

	@Test
	public void returnsSecondWhenFirstIsZero() {
		assertThat(GreatestCommonDivisor.of(0, 4), is(4));
	}

	@Test
	public void returnsGreatestCommonDivisorOfFirstAndSecond() {
		assertThat(GreatestCommonDivisor.of(6, 4), is(2));
	}
}

@@ -525,11 +525,123 @@
 (2));%0A%09%7D
+%0A%0A%09@Test%0A%09public void acceptsArgumentsInReverseOrder() %7B%0A%09%09assertThat(GreatestCommonDivisor.of(4, 6), is(2));%0A%09%7D
 %0A%7D%0A

Check that GreatestCommonDivisor accepts arguments in reverse order