use of com.redhat.service.bridge.manager.models.Bridge in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ConnectorsDAOTest method findByProcessorIdName.
@Test
public void findByProcessorIdName() {
Bridge b = createBridge();
Processor p = createProcessor(b, "foo");
ConnectorEntity c = createPersistConnector(p, "connector", ManagedResourceStatus.READY);
assertThat(connectorsDAO.findByProcessorIdAndName(p.getId(), c.getName())).isEqualTo(c);
}
use of com.redhat.service.bridge.manager.models.Bridge in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ConnectorsDAOTest method createBridge.
private Bridge createBridge() {
Bridge b = new Bridge();
b.setName(TestConstants.DEFAULT_BRIDGE_NAME);
b.setCustomerId(TestConstants.DEFAULT_CUSTOMER_ID);
b.setStatus(ManagedResourceStatus.READY);
b.setSubmittedAt(ZonedDateTime.now());
b.setPublishedAt(ZonedDateTime.now());
bridgeDAO.persist(b);
return b;
}
use of com.redhat.service.bridge.manager.models.Bridge in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ProcessorDAOTest method findByIdBridgeIdAndCustomerId.
@Test
public void findByIdBridgeIdAndCustomerId() {
Bridge b = createBridge();
Processor p = createProcessor(b, "foo");
Processor found = processorDAO.findByIdBridgeIdAndCustomerId(p.getId(), b.getId(), b.getCustomerId());
assertThat(found).isNotNull();
assertThat(found.getId()).isEqualTo(p.getId());
}
use of com.redhat.service.bridge.manager.models.Bridge in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ProcessorDAOTest method createBridge.
private Bridge createBridge() {
Bridge b = new Bridge();
b.setName(TestConstants.DEFAULT_BRIDGE_NAME);
b.setCustomerId(TestConstants.DEFAULT_CUSTOMER_ID);
b.setStatus(ManagedResourceStatus.READY);
b.setSubmittedAt(ZonedDateTime.now());
b.setPublishedAt(ZonedDateTime.now());
b.setShardId(TestConstants.SHARD_ID);
bridgeDAO.persist(b);
return b;
}
use of com.redhat.service.bridge.manager.models.Bridge in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ProcessorDAOTest method findByBridgeIdAndName.
@Test
public void findByBridgeIdAndName() {
Bridge b = createBridge();
Processor p = createProcessor(b, "foo");
Processor byBridgeIdAndName = processorDAO.findByBridgeIdAndName(b.getId(), p.getName());
assertThat(byBridgeIdAndName).isNotNull();
assertThat(byBridgeIdAndName.getName()).isEqualTo(p.getName());
assertThat(byBridgeIdAndName.getBridge().getId()).isEqualTo(b.getId());
}
Aggregations