public void ShGuid_Decode_ThrowsFormatException() { // Arrange var testString = "lupethefiasco.blogspot.com congratulations ladies, the next one's for you"; // Act var shGuid = ShGuid.Decode(testString); // Throws }
public void ShGuid_Decode_CheckShGuidDefaultSettings() { // Arrange var expectedShortGuid = "1cJYAG2AXEaFYDE9tsBUwA"; var stringifiedGuid = "0058c2d5-806d-465c-8560-313db6c054c0"; var expectedGuid = new Guid(stringifiedGuid); var expectedLength = 22; // Act var actualShGuid = ShGuid.Decode(expectedShortGuid); // Assert Assert.AreEqual <Guid>(expectedGuid, actualShGuid.Guid); Assert.AreEqual(expectedShortGuid, actualShGuid.ShortGuid); Assert.AreEqual(expectedLength, actualShGuid.ShortGuid.Length); }