コード例 #1
0
 public void Adjust_WhenArgumentIsNull_ThrowException(string anyVal, string arg)
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           MaybeFactory.MaybeOf("any").Adjust(
                                               just: val => arg,
                                               nothing: () => arg));
 }
コード例 #2
0
ファイル: SelectManyTest.cs プロジェクト: Ja-rek/CleanMonads
        public void QuerySelectMany_WhenFieldHasNothing_CanNotRetrunSelectedMaybe()
        {
            var actual = from justTwo in Just(MaybeFactory.MaybeOf <int>((int?)null))
                         from just in justTwo
                         select just;

            Assert.AreEqual(int_Nothing, actual);
        }