Search in sources :

Example 6 with ConsumerToken

use of com.ctrip.framework.apollo.openapi.entity.ConsumerToken in project apollo by ctripcorp.

the class ConsumerServiceTest method testCreateConsumerToken.

@Test
public void testCreateConsumerToken() throws Exception {
    ConsumerToken someConsumerToken = mock(ConsumerToken.class);
    ConsumerToken savedConsumerToken = mock(ConsumerToken.class);
    when(consumerTokenRepository.save(someConsumerToken)).thenReturn(savedConsumerToken);
    assertEquals(savedConsumerToken, consumerService.createConsumerToken(someConsumerToken));
}
Also used : ConsumerToken(com.ctrip.framework.apollo.openapi.entity.ConsumerToken) Test(org.junit.Test) AbstractUnitTest(com.ctrip.framework.apollo.portal.AbstractUnitTest)

Aggregations

ConsumerToken (com.ctrip.framework.apollo.openapi.entity.ConsumerToken)6 AbstractUnitTest (com.ctrip.framework.apollo.portal.AbstractUnitTest)4 Test (org.junit.Test)4 Date (java.util.Date)3 Consumer (com.ctrip.framework.apollo.openapi.entity.Consumer)1