Return an empty profile from a mocked Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 28 Oct 2013 20:50:24 +0000 (21:50 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:48 +0000 (22:25 +0100)
src/test/java/net/pterodactylus/sone/data/Mocks.java

index 5715084..e1b9102 100644 (file)
@@ -77,6 +77,7 @@ public class Mocks {
                Sone sone = mock(Sone.class);
                when(sone.getId()).thenReturn(id);
                when(sone.isLocal()).thenReturn(false);
+               when(sone.getProfile()).thenReturn(new Profile(sone));
                final Database database = core.getDatabase();
                when(sone.newPostBuilder()).thenThrow(IllegalStateException.class);
                when(sone.newPostReplyBuilder(Matchers.<String>anyObject())).thenThrow(IllegalStateException.class);