示例#1
0
        public void CanParseSystemGuid_FromString(string str)
        {
            var expected = (MiniGuid)Guid.Parse("6fa7b0bf-6577-4e99-8f73-f64e867fe236");

            var success = MiniGuid.TryParse(str, out var miniGuid);

            Assert.True(success);
            Assert.Equal(expected, miniGuid);
        }
示例#2
0
        public void CanParse_FromString()
        {
            var success = MiniGuid.TryParse("ABCDEabcdeABCDEabcdeABCDEa", out var miniGuid);

            Assert.True(success);
        }
示例#3
0
        public void FailsToParse_BadString(string str)
        {
            var success = MiniGuid.TryParse(str, out var _);

            Assert.False(success);
        }