@Override public CTLSchemaDto getCtlSchemaByFqnVersionTenantIdAndApplicationId(String fqn, int version, String tenantId, String applicationId) throws ControlServiceException { return ctlService.findCtlSchemaByFqnAndVerAndTenantIdAndApplicationId(fqn, version, tenantId, applicationId); }
CTLSchemaDto savedSchema = ctlService.findCtlSchemaByFqnAndVerAndTenantIdAndApplicationId(DEFAULT_FQN, 100, schema.getMetaInfo().getTenantId(), null); Assert.assertNotNull(savedSchema); Assert.assertEquals(schema, savedSchema);
@Test public void testFindCTLSchemaByFqnAndVerAndTenantIdAndApplicationId() { CtlSchemaMetaInfoDto metaInfo = firstSchema.getMetaInfo(); CTLSchemaDto found = ctlService.findCtlSchemaByFqnAndVerAndTenantIdAndApplicationId(metaInfo.getFqn(), firstSchema.getVersion(), metaInfo.getTenantId(), metaInfo.getApplicationId()); Assert.assertEquals(firstSchema, found); }
@Test public void testScopeUpdate() { CtlSchemaMetaInfoDto metaInfo = appSchema3.getMetaInfo(); metaInfo.setApplicationId(null); ctlService.updateCtlSchemaMetaInfoScope(metaInfo); CTLSchemaDto found = ctlService.findCtlSchemaByFqnAndVerAndTenantIdAndApplicationId(metaInfo.getFqn(), appSchema3.getVersion(), metaInfo.getTenantId(), null); Assert.assertEquals(appSchema3, found); }