DnsCertPrefix { @Override public String toString() { return "_" + port + Constants.DNS_LABEL_DELIMITER + "_" + protocol; } DnsCertPrefix();  DnsCertPrefix(String initString); void reinitialize(); void reinitialize(String initString); int getPort(); String getProtocol(); @Override String toString();  }
@Test public void defaultValuesDefaultConstructor () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix(); Assert.assertTrue( tlsaPrefix.toString().equals( DEFAULT_VALUES_PREFIX ) ); }
@Test public void defaultValuesNullInit () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( null ); Assert.assertTrue( tlsaPrefix.toString().equals( DEFAULT_VALUES_PREFIX ) ); }
@Test public void defaultValuesEmptyInit () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "" ); Assert.assertTrue( tlsaPrefix.toString().equals( DEFAULT_VALUES_PREFIX ) ); }
@Test public void defaultValuesWhitespaceInit () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( " " ); Assert.assertTrue( tlsaPrefix.toString().equals( DEFAULT_VALUES_PREFIX ) ); }
@Test public void defaultPort () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( ":udp" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_0._udp" ) ); }
@Test public void defaultPortWithWhitespace () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( " :udp" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_0._udp" ) ); }
@Test public void defaultProtocol () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "123" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_123._tcp" ) ); }
@Test public void defaultProtocolWithDelimiter () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "123:" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_123._tcp" ) ); }
@Test public void defaultProtocolZeroPort () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "0" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_0._tcp" ) ); }
@Test public void defaultProtocol65534Port () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "65534" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_65534._tcp" ) ); }
@Test public void defaultProtocol65535Port () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "65535" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_65535._tcp" ) ); }
@Test public void giveStringOfDefaultValues () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "0:tcp" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_0._tcp" ) ); }
@Test public void port1ProtocolTCP () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "1:tcp" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_1._tcp" ) ); }
@Test public void port1ProtocolUDP () { DnsCertPrefix tlsaPrefix = new DnsCertPrefix( "1:udp" ); Assert.assertTrue( tlsaPrefix.toString().equals( "_1._udp" ) ); }