public void ShGuid_TryParse_NegativeParse() { // Arrange var stringifiedGuid = "dogs >= cats"; ShGuid actualShGuid; // Act var actualResult = ShGuid.TryParse(stringifiedGuid, out actualShGuid); // Assert Assert.IsFalse(actualResult); }
public void ShGuid_TryParse_CheckShGuidDefaultSettings() { // Arrange var stringifiedGuid = "0058c2d5-806d-465c-8560-313db6c054c0"; var expectedGuid = new Guid(stringifiedGuid); var expectedShortGuid = "1cJYAG2AXEaFYDE9tsBUwA"; var expectedLength = 22; ShGuid actualShGuid; // Act var actualResult = ShGuid.TryParse(stringifiedGuid, out actualShGuid); // Assert Assert.IsTrue(actualResult); Assert.AreEqual <Guid>(expectedGuid, actualShGuid.Guid); Assert.AreEqual(expectedShortGuid, actualShGuid.ShortGuid); Assert.AreEqual(expectedLength, actualShGuid.ShortGuid.Length); }