Search in sources :

Example 6 with MicroserviceInstanceChangedEvent

use of io.servicecomb.serviceregistry.api.response.MicroserviceInstanceChangedEvent in project java-chassis by ServiceComb.

the class TestCacheRegistryListener method testonMicroserviceInstanceChangedDELETE.

@Test
public void testonMicroserviceInstanceChangedDELETE() {
    MicroserviceInstanceChangedEvent changedEvent = new MicroserviceInstanceChangedEvent();
    changedEvent.setAction(WatchAction.DELETE);
    MicroserviceKey key = Mockito.mock(MicroserviceKey.class);
    changedEvent.setKey(key);
    MicroserviceInstance mInstance = Mockito.mock(MicroserviceInstance.class);
    changedEvent.setInstance(mInstance);
    instance.onMicroserviceInstanceChanged(changedEvent);
}
Also used : MicroserviceInstanceChangedEvent(io.servicecomb.serviceregistry.api.response.MicroserviceInstanceChangedEvent) MicroserviceKey(io.servicecomb.serviceregistry.api.MicroserviceKey) MicroserviceInstance(io.servicecomb.serviceregistry.api.registry.MicroserviceInstance) Test(org.junit.Test)

Aggregations

MicroserviceInstanceChangedEvent (io.servicecomb.serviceregistry.api.response.MicroserviceInstanceChangedEvent)6 MicroserviceKey (io.servicecomb.serviceregistry.api.MicroserviceKey)4 Test (org.junit.Test)4 MicroserviceInstance (io.servicecomb.serviceregistry.api.registry.MicroserviceInstance)3 IpPort (io.servicecomb.foundation.common.net.IpPort)1 Microservice (io.servicecomb.serviceregistry.api.registry.Microservice)1 ClientException (io.servicecomb.serviceregistry.client.ClientException)1