コード例 #1
0
 public void testAllowedMarkers() throws IOException {
   assertEquals(
       function.apply("-----BEGIN CERTIFICATE-----"), "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t");
   assertEquals(function.apply("ssh-rsa"), "c3NoLXJzYQ==");
   assertEquals(
       function.apply("---- BEGIN SSH2 PUBLIC KEY ----"),
       "LS0tLSBCRUdJTiBTU0gyIFBVQkxJQyBLRVkgLS0tLQ==");
 }
コード例 #2
0
 @Test(expectedExceptions = IllegalArgumentException.class)
 public void testDisallowedMarkersIllegalArgument() throws IOException {
   function.apply("ssh-dsa");
 }