public void OrWithParallelSubtype_None()
        {
            var myOtherSubclass = new MyOtherSubclass();

            var underTest   = Maybe <MyClass> .None;
            var actualValue = underTest.Or(myOtherSubclass);

            Assert.That(actualValue, Is.SameAs(myOtherSubclass));
        }
        public void OrWithParallelType_Failure()
        {
            var myOtherSubclass = new MyOtherSubclass();

            var underTest = EFailable <MyClass> .Failure(new ArgumentException( "irrelevant" ));

            var actualValue = underTest.Or(myOtherSubclass);

            Assert.That(actualValue, Is.SameAs(myOtherSubclass));
        }
        public void OrWithParallelType_Success()
        {
            var mySubclass      = new MySubclass();
            var myOtherSubclass = new MyOtherSubclass();

            var underTest = EFailable <MyClass> .Success(mySubclass);

            var actualValue = underTest.Or(myOtherSubclass);

            Assert.That(actualValue, Is.SameAs(mySubclass));
        }
        public void OrWithParallelSubtype_Some()
        {
            var mySubclass      = new MySubclass();
            var myOtherSubclass = new MyOtherSubclass();

            var underTest = Option <MyClass, Exception> .Some(mySubclass);

            var actualValue = underTest.Or(myOtherSubclass);

            Assert.That(actualValue, Is.SameAs(mySubclass));
        }