Esempio n. 1
0
        public void TryParseFromBase64String_Output_Valid_Guid_Returning_True_From_Valid_String()
        {
            Guid result;

            Assert.That(AdvancedGuidParser.TryParseFromBase64String(_stubs.Base64StringPadding, out result), Is.True);
            Assert.That(result, Is.EqualTo(_stubs.Guid));
        }
Esempio n. 2
0
        public void TryParseFromBase64String_Output_Guid_Empty_Returning_False_From_NotValid_String()
        {
            Guid result;

            Assert.That(AdvancedGuidParser.TryParseFromBase64String(_stubs.InvalidString, out result), Is.False);
            Assert.That(result, Is.EqualTo(Guid.Empty));
        }
Esempio n. 3
0
 public void ParseFromBase64String_From_Valid_String_Wo_Padding_Returns_valid_Guid()
 {
     Assert.That(AdvancedGuidParser.ParseFromBase64String(_stubs.Base64StringNoPadding), Is.EqualTo(_stubs.Guid));
 }
Esempio n. 4
0
 public void ParseFromBase64String_From_Invalid_String_Length_Throws_Exception()
 {
     Assert.Throws <ArgumentException>(() => AdvancedGuidParser.ParseFromBase64String(_stubs.InvalidString));
 }
Esempio n. 5
0
 public void ParseFromZBase32String_Throws_Exception_When_Length_Is_NotValid()
 {
     Assert.Throws <ArgumentException>(() => AdvancedGuidParser.ParseFromZBase32String(_stubs.InvalidString));
 }
Esempio n. 6
0
 public void ParseFromZBase32String_Returns_valid_Guid()
 {
     Assert.That(AdvancedGuidParser.ParseFromZBase32String(_stubs.ZBase32String), Is.EqualTo(_stubs.Guid));
 }
Esempio n. 7
0
 public void Parse_Throws_Exception_For_Invalid_InputString()
 {
     Assert.Throws <FormatException>(() => AdvancedGuidParser.Parse(_stubs.InvalidString));
 }
Esempio n. 8
0
 public void Parse_Returns_Valid_Guid_For_Valid_Input_GuidString()
 {
     Assert.That(AdvancedGuidParser.Parse(_stubs.GuidString.ToString()), Is.EqualTo(_stubs.Guid));
 }
Esempio n. 9
0
 public void Parse_Returns_Valid_Guid_For_Valid_Input_Base64String_Wo_Padding()
 {
     Assert.That(AdvancedGuidParser.Parse(_stubs.Base64StringNoPadding), Is.EqualTo(_stubs.Guid));
 }