Example #1
0
                public void NullSource()
                {
                    var e = Assert.Throws <ArgumentNullException>(() =>
                                                                  Enumerable.LastOrNone(null, BreakingFunc.Of <object, bool>()));

                    Assert.That(e.ParamName, Is.EqualTo("source"));
                }
Example #2
0
        public void MatchWithNullSomeFunction(bool f, int v)
        {
            var e = Assert.Throws <ArgumentNullException>(() =>
                                                          Option.From(f, v).Match(null, BreakingFunc.Of <_>()));

            Assert.That(e.ParamName, Is.EqualTo("some"));
        }