Skip to content

Commit 50f4614

Browse files
committed
1 parent 2db66ce commit 50f4614

File tree

3 files changed

+109
-0
lines changed

3 files changed

+109
-0
lines changed

test/MSTest.Test.One/FailingTest.cs

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
using System;
3+
4+
namespace MSTest.Test.One
5+
{
6+
[TestClass]
7+
public class FailingTest
8+
{
9+
[TestMethod]
10+
public void WatchMeFail()
11+
{
12+
Assert.Fail("Watch me fail!");
13+
}
14+
15+
[TestMethod]
16+
public void WatchMeThrowAnException()
17+
{
18+
throw new NotImplementedException("Watch me crash and burn!");
19+
}
20+
21+
[TestMethod]
22+
public void TestSuperHero()
23+
{
24+
var obj = new SuperHero();
25+
obj.Batman();
26+
Assert.IsTrue(true);
27+
}
28+
}
29+
30+
public class SuperHero
31+
{
32+
public void Batman()
33+
{
34+
throw new Exception("Batman failed");
35+
}
36+
}
37+
}

test/NUnit.Test.One/FailingTest.cs

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using NUnit.Framework;
2+
using System;
3+
4+
namespace NUnit.Test.One
5+
{
6+
public class FailingTest
7+
{
8+
[Test]
9+
public void WatchMeFail()
10+
{
11+
Assert.Fail("Watch me fail!");
12+
}
13+
14+
[Test]
15+
public void WatchMeThrowAnException()
16+
{
17+
throw new NotImplementedException("Watch me crash and burn!");
18+
}
19+
20+
[Test]
21+
public void TestSuperHero()
22+
{
23+
var obj = new SuperHero();
24+
obj.Batman();
25+
Assert.Pass();
26+
}
27+
}
28+
29+
public class SuperHero
30+
{
31+
public void Batman()
32+
{
33+
throw new Exception("Batman failed");
34+
}
35+
}
36+
}

test/XUnit.Test.One/FailingTest.cs

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using Xunit;
3+
4+
namespace XUnit.Test.One
5+
{
6+
public class FailingTest
7+
{
8+
[Fact]
9+
public void WatchMeFail()
10+
{
11+
Assert.True(false, "Watch me fail!");
12+
}
13+
14+
[Fact]
15+
public void WatchMeThrowAnException()
16+
{
17+
throw new NotImplementedException("Watch me crash and burn!");
18+
}
19+
20+
[Fact]
21+
public void TestSuperHero()
22+
{
23+
var obj = new SuperHero();
24+
obj.Batman();
25+
Assert.True(true);
26+
}
27+
}
28+
29+
public class SuperHero
30+
{
31+
public void Batman()
32+
{
33+
throw new Exception("Batman failed");
34+
}
35+
}
36+
}

0 commit comments

Comments
 (0)