public static void ThrowWhenNonStatic() { Type type = typeof(MockNonStaticTestSuite); Assert(RimTest.CheckTestSuiteIsStatic(type)).To.Be.False(); AssertFunc(() => RimTest.IsValidTestSuite(type)).To.Throw(); }
public static void ThrowWhenInvalid() { AssertFunc(() => RimTest.IsValidTest(GetMethodInfo("NonParameterFreeTest"))).To.Throw(); AssertFunc(() => RimTest.IsValidTest(GetMethodInfo("NonVoidReturnTest"))).To.Throw(); AssertFunc(() => RimTest.IsValidTest(GetMethodInfo("NonStaticTest"))).To.Throw(); AssertFunc(() => RimTest.IsValidTest(GetMethodInfo("NonPublicTest"))).To.Throw(); }
public static void ChecksAreFalseWhenNull() { Assert(RimTest.CheckTestIsPublic(null)).To.Be.False(); Assert(RimTest.CheckTestIsStatic(null)).To.Be.False(); Assert(RimTest.CheckTestReturnsVoid(null)).To.Be.False(); Assert(RimTest.CheckTestIsParameterFree(null)).To.Be.False(); }
public static void ThrowWhenInvalid() { AssertFunc(() => RimTest.IsValidTestSuite(typeof(MockNonStaticTestSuite))).To.Throw(); AssertFunc(() => RimTest.IsValidTestSuite(typeof(MockNonPublicTestSuite))).To.Throw(); }
public static void PassWhenStatic() { Assert(RimTest.CheckTestSuiteIsStatic(typeof(MockValidTestSuite))).To.Be.True(); }
public static void ChecksAreFalseWhenNull() { Assert(RimTest.CheckTestSuiteIsPublic(null)).To.Be.False(); Assert(RimTest.CheckTestSuiteIsStatic(null)).To.Be.False(); }
public static void IsValidTestSuiteThrowWhenNull() { AssertFunc(() => RimTest.IsValidTestSuite(null)).To.Throw(); }
public static void PassWhenValid() { AssertFunc(() => RimTest.IsValidTestSuite(typeof(MockValidTestSuite))).Not.To.Throw(); }
public static void CheckIsFalseWhenNonVoidReturnType() { Assert(RimTest.CheckTestReturnsVoid(GetMethodInfo("NonVoidReturnTest"))).To.Be.False(); }
public static void CheckIsFalseWhenNonStatic() { Assert(RimTest.CheckTestIsStatic(GetMethodInfo("NonStaticTest"))).To.Be.False(); }
public static void PassWhenValid() { AssertFunc(delegate { RimTest.IsValidTest(GetMethodInfo("ValidTest")); }).Not.To.Throw(); }
public static void PassWhenReturnsVoid() { Assert(RimTest.CheckTestReturnsVoid(GetMethodInfo("ValidTest"))).To.Be.True(); }
public static void PassWhenParameterFree() { Assert(RimTest.CheckTestIsParameterFree(GetMethodInfo("ValidTest"))).To.Be.True(); }
public static void PassWhenStatic() { Assert(RimTest.CheckTestIsStatic(GetMethodInfo("ValidTest"))).To.Be.True(); }
public static void CheckIsFalseWhenAcceptsParameters() { Assert(RimTest.CheckTestIsParameterFree(GetMethodInfo("NonParameterFreeTest"))).To.Be.False(); }