Пример #1
0
        public void ToString_with_HasValue_true_returns_value_as_string()
        {
            MaybeThrows <string> maybe = MaybeThrows <string> .Has("Hello");

            Assert.Equal("Hello", maybe.ToString());
        }
Пример #2
0
        public void ToString_with_HasValue_false_returns_empty_string()
        {
            MaybeThrows <string> maybe2 = MaybeThrows <string> .None;

            Assert.Equal(string.Empty, maybe2.ToString());
        }