Mock Core.getSones().
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 5 Nov 2013 06:46:21 +0000 (07:46 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 28 Feb 2014 21:25:52 +0000 (22:25 +0100)
src/test/java/net/pterodactylus/sone/data/Mocks.java

index cbe9844..8c8c93a 100644 (file)
@@ -70,6 +70,12 @@ public class Mocks {
                                return (soneId == null) ? Optional.<Sone>absent() : fromNullable(sones.get(soneId));
                        }
                });
+               when(core.getSones()).then(new Answer<Collection<Sone>>() {
+                       @Override
+                       public Collection<Sone> answer(InvocationOnMock invocation) throws Throwable {
+                               return sones.values();
+                       }
+               });
                when(core.getLocalSones()).then(new Answer<Collection<Sone>>() {
                        @Override
                        public Collection<Sone> answer(InvocationOnMock invocation) throws Throwable {