Create a gist now

Instantly share code, notes, and snippets.

Embed
package com.richashworth.testingutils.mocking;
import org.junit.Test;
import static junit.framework.Assert.assertEquals;
public class FootballerTest {
@Test
public void testGetGameGoalsRatio() {
Footballer footballer = new Footballer();
footballer.setGamesPlayed(14);
footballer.setGoalsScored(7);
assertEquals(Double.valueOf(0.5), footballer.getAvgGoalsPerGame());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment