public void ShGuid_TryDecode_NegativeDecode() { // Arrange var expectedShortGuid = ":0 ~yawn"; ShGuid actualShGuid; // Act var actualResult = ShGuid.TryDecode(expectedShortGuid, out actualShGuid); // Assert Assert.IsFalse(actualResult); }
public void ShGuid_TryDecode_CheckInitializedDefaultSettings() { // Arrange var expectedShortGuid = "1cJYAG2AXEaFYDE9tsBUwA"; var stringifiedGuid = "0058c2d5-806d-465c-8560-313db6c054c0"; var expectedGuid = new Guid(stringifiedGuid); var expectedLength = 22; ShGuid actualShGuid; // Act var actualResult = ShGuid.TryDecode(expectedShortGuid, out actualShGuid); // Assert Assert.IsTrue(actualResult); Assert.AreEqual <Guid>(expectedGuid, actualShGuid.Guid); Assert.AreEqual(expectedShortGuid, actualShGuid.ShortGuid); Assert.AreEqual(expectedLength, actualShGuid.ShortGuid.Length); }