internal static void Issue004_MockCanCallBaseD(Fake <BaseHolder> sample, int value) { sample.Setup(d => d.GetValueD(value), Behavior.Base <BaseHolder>()); sample.Dummy.GetValueD(value); sample.Dummy.ValueHolder.Assert().Is(value); sample.VerifyAll(); }
internal static void Issue004_MockCallBaseAbstractInvalid(Fake <BaseHolder> sample) { sample.Setup(d => d.GetValueUnset(), Behavior.Base <BaseHolder>()); Tools.Asserter.Throws <InvalidOperationException>(() => sample.Dummy.GetValueUnset()); }
internal static void Issue004_MockCanCallBaseThrow(Fake <BaseHolder> sample, Exception e) { sample.Setup(d => d.ThrowError(e), Behavior.Base <BaseHolder>()); Tools.Asserter.Throws <Exception>(() => sample.Dummy.ThrowError(e)).Assert().Is(e); sample.VerifyAll(); }
internal static void Issue004_MockCanCallBaseA(Fake <BaseHolder> sample) { sample.Setup(d => d.GetValueA(), Behavior.Base <BaseHolder, int>()); sample.Dummy.GetValueA().Assert().Is(BaseHolder._TestValue); sample.VerifyAll(); }
internal static void Issue004_MockCallBaseWrongTypeInvalid(Fake <IBaseHolder> sample) { sample.Setup(d => d.GetValueUnset(), Behavior.Base <string>()); Tools.Asserter.Throws <MissingMethodException>(() => sample.Dummy.GetValueUnset()); }