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)); }
static void Null() { Assert.Equal(TryParse.Guid(null), None()); Assert.Equal(TryParse.Guid(null, "dd/MM/yyyy"), None()); }
static void Fail() { Assert.Equal(TryParse.Guid("ab"), None()); Assert.Equal(TryParse.Guid("ab", "X"), None()); }