public void ReturnsBase64String(Guid input, string expected) { var base64Guid = new Base64Guid(input); var result = base64Guid.ToString(); Assert.Equal(expected, result); }
public void ReturnsBase64StringWithPadding(Guid input, string expected) { expected += "=="; var base64Guid = new Base64Guid(input, options => options.UsePadding()); var result = base64Guid.ToString(); Assert.Equal(expected, result); }
public void ReturnsUrlUnsafeBase64String(Guid input, string expected) { expected = expected.Replace("-", "+").Replace("_", "/"); var base64Guid = new Base64Guid(input, options => options.UseStandardBase64Encoding()); var result = base64Guid.ToString(); Assert.Equal(expected, result); }
public void ReturnsTrueWhenComparingWithString() { var guid = new Guid(); var a = new Base64Guid(guid); var b = a.ToString(); var result = a == b; Assert.True(result); }