From: David ‘Bombe’ Roden Date: Mon, 28 Oct 2013 20:50:24 +0000 (+0100) Subject: Return an empty profile from a mocked Sone. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3d08e91faa3faaf496fdec77b9a11a03b8be1041;p=Sone.git Return an empty profile from a mocked Sone. --- diff --git a/src/test/java/net/pterodactylus/sone/data/Mocks.java b/src/test/java/net/pterodactylus/sone/data/Mocks.java index 5715084..e1b9102 100644 --- a/src/test/java/net/pterodactylus/sone/data/Mocks.java +++ b/src/test/java/net/pterodactylus/sone/data/Mocks.java @@ -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.anyObject())).thenThrow(IllegalStateException.class);