@Test public void testBadQualifier() { expectedException.expect(IllegalStateException.class); bigtableClusterName.toTableId( clusterName.replace("some-cluster", "another-cluster") + "/" + BigtableClusterName.TABLE_SEPARATOR + "/foo"); }
@Test public void testNoTableName() { expectedException.expect(IllegalStateException.class); bigtableClusterName.toTableId(clusterName + "/" + BigtableClusterName.TABLE_SEPARATOR); }
@Test public void testNullQualifier() { expectedException.expect(NullPointerException.class); bigtableClusterName.toTableId(null); }
@Test public void testGoodTableQualifier() { bigtableClusterName.toTableId(clusterName + "/" + BigtableClusterName.TABLE_SEPARATOR + "/foo"); }
@Test public void testCreateTablesRequest() { CreateTableRequest.Builder builder = CreateTableRequest.newBuilder(); builder.setName(bigtableClusterName.toString()); Assert.assertEquals(clusterName, builder.getName()); }
@Test public void testFormat() { Assert.assertEquals(clusterName, bigtableClusterName.toString()); }