@Test public void Create_Always_CallsStorage() throws Exception { sut.create(10); verify(storage).putValue("10", "{\"buildId\":10,\"builds\":[],\"isFinished\":false,\"changes\":[],\"solved\":false,\"answer\":0}"); }
public void create(long buildId) throws IOException { Bisect bisect = new Bisect(buildId); String json = gson.toJson(bisect); storage.putValue(String.valueOf(buildId), json); }
BisectRepository { public void create(long buildId) throws IOException { Bisect bisect = new Bisect(buildId); String json = gson.toJson(bisect); storage.putValue(String.valueOf(buildId), json); } }
BisectRepository { public void create(long buildId) throws IOException { Bisect bisect = new Bisect(buildId); String json = gson.toJson(bisect); storage.putValue(String.valueOf(buildId), json); } BisectRepository(CustomDataStorage storage); }
BisectRepository { public void create(long buildId) throws IOException { Bisect bisect = new Bisect(buildId); String json = gson.toJson(bisect); storage.putValue(String.valueOf(buildId), json); } BisectRepository(CustomDataStorage storage); boolean exists(long buildId); void create(long buildId); Bisect[] getAllNotFinished(); Bisect get(long buildId); void save(Bisect bisect); }
BisectRepository { public void create(long buildId) throws IOException { Bisect bisect = new Bisect(buildId); String json = gson.toJson(bisect); storage.putValue(String.valueOf(buildId), json); } BisectRepository(CustomDataStorage storage); boolean exists(long buildId); void create(long buildId); Bisect[] getAllNotFinished(); Bisect get(long buildId); void save(Bisect bisect);  }