/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Bell Canada.
- * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.cds.client;
+import static org.assertj.core.api.Assertions.assertThatCode;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
.register(InProcessChannelBuilder.forName(SERVER_NAME).directExecutor().build());
// Create an instance of the gRPC client
- client = new CdsProcessorGrpcClient(channel, new CdsProcessorHandler(listener));
+ client = new CdsProcessorGrpcClient(channel, new CdsProcessorHandler(listener, "gRPC://localhost:1234/"));
// Implement the test gRPC server
BluePrintProcessingServiceImplBase testCdsBlueprintServerImpl = new BluePrintProcessingServiceImplBase() {
@Test
public void testCdsProcessorGrpcClientConstructor() {
- new CdsProcessorGrpcClient(listener, props).close();
+ assertThatCode(() -> new CdsProcessorGrpcClient(listener, props).close()).doesNotThrowAnyException();
}
@Test(expected = IllegalStateException.class)