@Override public ListEnvironmentsResponse listEnvironments(ListEnvironmentsRequest request) { return ListEnvironmentsResponse.builder() .environmentIds( Collections.singletonList( EnvironmentId.builder() .accountId(accountId) .cluster(clusterName) .environmentName(environmentName) .build())) .build(); }
.clusterName(environmentId.getCluster()) .environmentName(environmentId.getEnvironmentName()) .activeEnvironmentRevisionId(activeEnvironmentRevisionId) .environmentType(
@Test public void mapsInputsAndOutputsCorrectly() throws Exception { EnvironmentId id = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(TEST_CLUSTER) .isEqualToIgnoringGivenFields(environment, "environmentName", "cluster", "environmentType"); assertThat(response.getEnvironment()) .hasFieldOrPropertyWithValue("cluster", id.getCluster()) .hasFieldOrPropertyWithValue("environmentName", id.getEnvironmentName()) .hasFieldOrPropertyWithValue("environmentType", ENVIRONMENT_TYPE_STRING);
@Test public void mapsInputsAndOutputsCorrectly() throws Exception { EnvironmentId id = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(TEST_CLUSTER) .isEqualToIgnoringGivenFields(environment, "environmentName", "cluster", "environmentType"); assertThat(response.getEnvironment()) .hasFieldOrPropertyWithValue("cluster", id.getCluster()) .hasFieldOrPropertyWithValue("environmentName", id.getEnvironmentName()) .hasFieldOrPropertyWithValue("environmentType", ENVIRONMENT_TYPE_STRING);
public EnvironmentIdBuilder environmentId() { return EnvironmentId.builder() .accountId(accountId) .cluster(clusterName) .environmentName(environmentName); }
@Test public void testFromDataServiceResponse() { final ListEnvironmentsResponse dsResponse = ListEnvironmentsResponse.builder() .environmentIds( Collections.singletonList( EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(CLUSTER) .environmentName(ENVIRONMENT_NAME) .build())) .build(); final ListEnvironments.ListEnvironmentsResponse response = mapper.fromDataServiceResponse(dsResponse); assertThat(response.getEnvironmentNames().size()).isEqualTo(1); assertThat(response.getEnvironmentNames().get(0)).isEqualTo(ENVIRONMENT_NAME); assertThat(response.getNextToken()).isNull(); } }
@Before public void setUp() { environmentId = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(CLUSTER) .environmentName(ENVIRONMENT_NAME) .build(); }
@Test public void mapsInputsAndOutputsCorrectly() throws Exception { EnvironmentId id = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(TEST_CLUSTER)
@Test public void mapsInputsAndOutputsCorrectly() throws Exception { EnvironmentId id = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(TEST_CLUSTER)
@Bean public DataService dataService() throws Exception { return when(mock(DataService.class) .listEnvironments( ListEnvironmentsRequest.builder() .cluster( Cluster.builder().accountId(ACCOUNT_ID).clusterName(CLUSTER_NAME).build()) .build())) .thenReturn( ListEnvironmentsResponse.builder() .environmentIds( Collections.singletonList( EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(CLUSTER_NAME) .environmentName(ENVIRONMENT_NAME) .build())) .build()) .getMock(); }
@Bean public DataService dataService() throws Exception { final EnvironmentId environmentId = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(CLUSTER_NAME)
@Test public void mapsInputsAndOutputsCorrectly() throws Exception { EnvironmentId id = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(TEST_CLUSTER)
com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(CLUSTER)
.build(); environmentIdWrapper = com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(CLUSTER)