package br.com.mutley;
import org.junit.Assert;
import org.junit.Test;
import br.com.mutley.data.Badge;
import br.com.mutley.data.Coder;
public class CoderTest extends Assert {
@Test
public void itShouldReturnEmptyBadgeWhenBadgeWasNotFound() {
Coder coder = new Coder();
Badge badge = coder.getBadge("test");
assertNull(badge.getBadge());
assertNull(badge.getCreated());
assertNull(badge.getDescription());
assertNull(badge.getName());
}
@Test(expected = IllegalArgumentException.class)
public void itShouldValidateGetBadgeInput() {
Coder coder = new Coder();
coder.getBadge(null);
}
}