Example #1
0
 public void Decode_WithLabel_BadPattern()
 {
     Assert.Throws <FormatException>(() => {
         ShortGuidString.Decode("Cheesecake " + EncodedShort + "a");
     });
     Assert.Throws <FormatException>(() => {
         ShortGuidString.Decode("Cheesecake *asdf");
     });
 }
Example #2
0
 public void Decode_WithoutLabel_Legacy()
 {
     Assert.Equal(Raw, ShortGuidString.Decode(EncodedLegacy));
 }
Example #3
0
 public void Decode_WithLabel_Legacy()
 {
     Assert.Equal(Raw, ShortGuidString.Decode("Cheesecake " + EncodedLegacy));
 }
Example #4
0
 public void Decode_WithoutLabel_Short()
 {
     Assert.Equal(Raw, ShortGuidString.Decode(EncodedShort));
 }
Example #5
0
 public void Encode_Nulllabel()
 {
     Assert.Throws <ArgumentNullException>(() => {
         ShortGuidString.Encode(Raw, null);
     });
 }
Example #6
0
 public void Encode_WithLabel_Tricky()
 {
     Assert.Equal("* " + EncodedShort, ShortGuidString.Encode(Raw, "*"));
 }
Example #7
0
 public void Encode_WithLabel()
 {
     Assert.Equal("Cheesecake " + EncodedShort, ShortGuidString.Encode(Raw, "Cheesecake"));
 }
Example #8
0
 public void Encode_WithoutLabel()
 {
     Assert.Equal(EncodedShort, ShortGuidString.Encode(Raw));
 }