Search in sources :

Example 1 with DomainProducer

use of org.apache.camel.component.openstack.keystone.producer.DomainProducer in project camel by apache.

the class DomainProducerTest method setUp.

@Before
public void setUp() {
    producer = new DomainProducer(endpoint, client);
    when(domainService.create(any(Domain.class))).thenReturn(testOSdomain);
    when(domainService.get(anyString())).thenReturn(testOSdomain);
    List<Domain> getAllList = new ArrayList<>();
    getAllList.add(testOSdomain);
    getAllList.add(testOSdomain);
    doReturn(getAllList).when(domainService).list();
    dummyDomain = createDomain();
    when(testOSdomain.getName()).thenReturn(dummyDomain.getName());
    when(testOSdomain.getDescription()).thenReturn(dummyDomain.getDescription());
}
Also used : DomainProducer(org.apache.camel.component.openstack.keystone.producer.DomainProducer) ArrayList(java.util.ArrayList) Domain(org.openstack4j.model.identity.v3.Domain) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 DomainProducer (org.apache.camel.component.openstack.keystone.producer.DomainProducer)1 Before (org.junit.Before)1 Domain (org.openstack4j.model.identity.v3.Domain)1