@Test @SuppressWarnings("all") public void aggregatedListTargetInstancesExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListTargetInstances(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void listInterconnectAttachmentsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); client.listInterconnectAttachments(region); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void listTargetHttpProxiesExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.listTargetHttpProxies(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void aggregatedListTargetPoolsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListTargetPools(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void deleteImageExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]"); client.deleteImage(image); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void getImageExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectGlobalImageName image = ProjectGlobalImageName.of("[PROJECT]", "[IMAGE]"); client.getImage(image); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void listHttpsHealthChecksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.listHttpsHealthChecks(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void aggregatedListInstancesExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListInstances(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void listRegionInstanceGroupsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); client.listRegionInstanceGroups(region); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void aggregatedListDisksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListDisks(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void listHealthChecksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.listHealthChecks(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void getFirewallExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectGlobalFirewallName firewall = ProjectGlobalFirewallName.of("[PROJECT]", "[FIREWALL]"); client.getFirewall(firewall); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void getRegionExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectRegionName region = ProjectRegionName.of("[PROJECT]", "[REGION]"); client.getRegion(region); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void getNetworkExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectGlobalNetworkName network = ProjectGlobalNetworkName.of("[PROJECT]", "[NETWORK]"); client.getNetwork(network); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void aggregatedListNodeGroupsExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListNodeGroups(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void aggregatedListSubnetworksExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListSubnetworks(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void aggregatedListAcceleratorTypesExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectName project = ProjectName.of("[PROJECT]"); client.aggregatedListAcceleratorTypes(project); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void getRegionDiskExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectRegionDiskName disk = ProjectRegionDiskName.of("[PROJECT]", "[REGION]", "[DISK]"); client.getRegionDisk(disk); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void listInstanceGroupManagersExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectZoneName zone = ProjectZoneName.of("[PROJECT]", "[ZONE]"); client.listInstanceGroupManagers(zone); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }
@Test @SuppressWarnings("all") public void deleteRouteExceptionTest() throws Exception { ApiException exception = ApiExceptionFactory.createException( new Exception(), FakeStatusCode.of(Code.INVALID_ARGUMENT), false); mockService.addException(exception); try { ProjectGlobalRouteName route = ProjectGlobalRouteName.of("[PROJECT]", "[ROUTE]"); client.deleteRoute(route); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { // Expected exception } }