public static IEnumerable <object> DefaultReturnValueCases() { return(TestCases.FromProperties( new { MethodName = nameof(IHaveDifferentReturnValues.IntReturn), ExpectedReturnValue = (object)0 }, new { MethodName = nameof(IHaveDifferentReturnValues.StringReturn), ExpectedReturnValue = (object)string.Empty }, new { MethodName = nameof(IHaveDifferentReturnValues.DummyableReturn), ExpectedReturnValue = (object)A.Dummy <DummyableClass>() })); }
public static IEnumerable <object> DefaultReturnValueCases() { return(TestCases.FromProperties( new { MethodName = "IntReturn", ExpectedReturnValue = (object)0 }, new { MethodName = "StringReturn", ExpectedReturnValue = (object)null }, new { MethodName = "SelfReturn", ExpectedReturnValue = (object)null })); }
public static IEnumerable <object> DefaultReturnValueCases() { return(TestCases.FromProperties( new { Method = GetMethodInfo <IHaveDifferentReturnValues>(x => x.IntReturn()), ExpectedReturnValue = (object)0 }, new { Method = GetMethodInfo <IHaveDifferentReturnValues>(x => x.StringReturn()), ExpectedReturnValue = (object)string.Empty }, new { Method = GetMethodInfo <IHaveDifferentReturnValues>(x => x.DummyableReturn()), ExpectedReturnValue = (object)A.Dummy <DummyableClass>() })); }
public static IEnumerable <object> SpecificCases() { return(TestCases.FromProperties( new { LessSpecific = typeof(object), MoreSpecific = typeof(DateTime), Value = (object)new DateTime(2000, 1, 1) }, new { LessSpecific = typeof(object), MoreSpecific = typeof(Stream), Value = (object)new MemoryStream() }, new { LessSpecific = typeof(object), MoreSpecific = typeof(IFoo), Value = (object)A.Fake <IFoo>() })); }