Пример #1
0
            static void Success()
            {
                var guid = System.Guid.NewGuid();

                Assert.Equal(TryParse.Guid(guid.ToString()), Some(guid));
                Assert.Equal(TryParse.Guid(guid.ToString("X"), "X"), Some(guid));
            }
Пример #2
0
 static void Null()
 {
     Assert.Equal(TryParse.Guid(null), None());
     Assert.Equal(TryParse.Guid(null, "dd/MM/yyyy"), None());
 }
Пример #3
0
 static void Fail()
 {
     Assert.Equal(TryParse.Guid("ab"), None());
     Assert.Equal(TryParse.Guid("ab", "X"), None());
 }