示例#1
0
            public void ReturnsBase64String(Guid input, string expected)
            {
                var base64Guid = new Base64Guid(input);

                var result = base64Guid.ToString();

                Assert.Equal(expected, result);
            }
示例#2
0
            public void ReturnsBase64StringWithPadding(Guid input, string expected)
            {
                expected += "==";
                var base64Guid = new Base64Guid(input, options => options.UsePadding());

                var result = base64Guid.ToString();

                Assert.Equal(expected, result);
            }
示例#3
0
            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);
            }
示例#4
0
            public void ReturnsTrueWhenComparingWithString()
            {
                var guid = new Guid();
                var a    = new Base64Guid(guid);
                var b    = a.ToString();

                var result = a == b;

                Assert.True(result);
            }