@Test(expected = UnknownRoadException.class) public void deleteSchemaForRoadThatDoesNotExist() throws Exception { client.deleteSchemaVersion("not-exist", 1); }
@Override public void deleteSchemaVersion(String name, int version) throws UnknownRoadException { Optional.of(getRoad(name)).map(Road::getSchemas).map(m -> m.get(version)).ifPresent(markSchemaAsDeleted(name)); }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public void deleteSchemaVersion(String name, int version) throws UnknownRoadException { Optional.of(getRoad(name)).map(Road::getSchemas).map(m -> m.get(version)).ifPresent(markSchemaAsDeleted(name)); } }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public void deleteSchemaVersion(String name, int version) throws UnknownRoadException { Optional.of(getRoad(name)).map(Road::getSchemas).map(m -> m.get(version)).ifPresent(markSchemaAsDeleted(name)); } @Autowired  TollboothSchemaStoreClient(@Value("#{store}") Map<String, Road> store, PatchSetEmitter modificationEmitter); }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public void deleteSchemaVersion(String name, int version) throws UnknownRoadException { Optional.of(getRoad(name)).map(Road::getSchemas).map(m -> m.get(version)).ifPresent(markSchemaAsDeleted(name)); } @Autowired  TollboothSchemaStoreClient(@Value("#{store}") Map<String, Road> store, PatchSetEmitter modificationEmitter); @Override Optional<SchemaVersion> getSchema(String name, int version); @Override Optional<SchemaVersion> getActiveSchema(String name, int version); @Override Optional<SchemaVersion> getLatestActiveSchema(String name); @Override SchemaVersion registerSchema(String name, Schema schema); @Override SchemaVersion registerSchema(String name, Schema schema, int version); @Override Map<Integer, SchemaVersion> getAllSchemaVersions(String name); @Override Map<Integer, SchemaVersion> getActiveSchemaVersions(String name); @Override void deleteSchemaVersion(String name, int version); }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public void deleteSchemaVersion(String name, int version) throws UnknownRoadException { Optional.of(getRoad(name)).map(Road::getSchemas).map(m -> m.get(version)).ifPresent(markSchemaAsDeleted(name)); } @Autowired  TollboothSchemaStoreClient(@Value("#{store}") Map<String, Road> store, PatchSetEmitter modificationEmitter); @Override Optional<SchemaVersion> getSchema(String name, int version); @Override Optional<SchemaVersion> getActiveSchema(String name, int version); @Override Optional<SchemaVersion> getLatestActiveSchema(String name); @Override SchemaVersion registerSchema(String name, Schema schema); @Override SchemaVersion registerSchema(String name, Schema schema, int version); @Override Map<Integer, SchemaVersion> getAllSchemaVersions(String name); @Override Map<Integer, SchemaVersion> getActiveSchemaVersions(String name); @Override void deleteSchemaVersion(String name, int version);  }