Exemple #1
0
        public void TestCreateEmpty()
        {
            var boxedMaybe = MaybeUtils.CreateEmpty(typeof(int));

            Assert.IsInstanceOf <Maybe <int> >(boxedMaybe);

            var maybe = (Maybe <int>)boxedMaybe;

            Assert.IsFalse(maybe.HasValue);
        }
Exemple #2
0
 public void TestCreateEmptyNull()
 {
     Assert.Throws <ArgumentNullException>(() => MaybeUtils.CreateEmpty(null));
 }