public void RethrowIfAssertExceptionThrowsExceptionOnAssertFailure() { Action a = () => this.sut.RethrowIfAssertException(new TestFrameworkV2.AssertFailedException()); ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(TestFrameworkV2.AssertFailedException)); }
public void InstanceNotOfTypeShouldFailWhenTypeIsNull() { Action action = () => TestFrameworkV2.Assert.IsNotInstanceOfType(5, null); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void UnitTestElementConstructorShouldThrowIfTestMethodIsNull() { ActionUtility.ActionShouldThrowExceptionOfType( () => new UnitTestElement(null), typeof(ArgumentNullException)); }
public void RunSingleTestShouldThrowIfTestMethodIsNull() { Action a = () => this.unitTestRunner.RunSingleTest(null, null); ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(ArgumentNullException)); }
public void InstanceOfTypeShouldFailWhenValueIsNull() { Action action = () => TestFrameworkV2.Assert.IsInstanceOfType(null, typeof(AssertTests)); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void AreEqualShouldFailWhenNotEqualFloatWithDelta() { Action action = () => TestFrameworkV2.Assert.AreEqual(100E-2, 200E-2, 50E-2); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void LoadShouldThrowIfReaderIsNull() { ActionUtility.ActionShouldThrowExceptionOfType(() => this.settingsProvider.Load(null), typeof(ArgumentNullException)); }
public void AreEqualShouldFailWhenNotEqualDouble() { Action action = () => TestFrameworkV2.Assert.AreEqual(0.1, 0.2); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void AreEqualShouldFailWhenNotEqualDecimalWithDelta() { Action action = () => TestFrameworkV2.Assert.AreEqual(0.1M, 0.2M, 0.05M); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void AreNotEqualShouldFailWhenNotEqualLongWithDelta() { Action action = () => TestFrameworkV2.Assert.AreNotEqual(1L, 2L, 1L); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void AreEqualShouldFailWhenNotEqualStringAndCaseIgnored() { Action action = () => TestFrameworkV2.Assert.AreEqual("A", "a", false); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void AreNotEqualShouldFailWhenNotEqualString() { Action action = () => TestFrameworkV2.Assert.AreNotEqual("A", "A"); ActionUtility.ActionShouldThrowExceptionOfType(action, typeof(TestFrameworkV2.AssertFailedException)); }
public void DiscoverTestsShouldThrowIfLoggerIsNull() { Action a = () => this.discoverer.DiscoverTests(new List <string>(), this.mockDiscoveryContext.Object, null, this.mockTestCaseDiscoverySink.Object); ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(ArgumentNullException)); }
public void DiscoverTestsShouldThrowIfSourcesIsNull() { Action a = () => this.discoverer.DiscoverTests(null, this.mockDiscoveryContext.Object, this.mockMessageLogger.Object, this.mockTestCaseDiscoverySink.Object); ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(ArgumentNullException)); }
public void ExpectedExceptionAttributeConstructerShouldThrowArgumentException() { Action a = () => new TestFrameworkV2.ExpectedExceptionAttribute(typeof(ExpectedExceptionAttributeTests), "Dummy"); ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(ArgumentException)); }
public void ExpectedExceptionAttributeConstructerShouldThrowArgumentNullExceptionWhenExceptionTypeIsNull() { Action a = () => new TestFrameworkV2.ExpectedExceptionAttribute(null, "Dummy"); ActionUtility.ActionShouldThrowExceptionOfType(a, typeof(ArgumentNullException)); }