Skip to content

Commit 37d3e04

Browse files
committed
Add more links to MSTest api docs
1 parent 63cc683 commit 37d3e04

File tree

3 files changed

+71
-38
lines changed

3 files changed

+71
-38
lines changed

docs/core/testing/unit-testing-mstest-writing-tests-assertions.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,45 @@ Use the `Assert` classes of the <xref:Microsoft.VisualStudio.TestTools.UnitTesti
1212

1313
## The `Assert` class
1414

15-
In your test method, you can call any methods of the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert?displayProperty=fullName> class, such as <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual%2A?displayProperty=nameWithType>. The <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert> class has many methods to choose from, and many of the methods have several overloads.
15+
Use the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert> class to verify that the code under test behaves as expected. Available APIs are:
16+
17+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreEqual>
18+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreNotEqual>
19+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreNotSame>
20+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.AreSame>
21+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Fail>
22+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.Inconclusive>
23+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsFalse>
24+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsInstanceOfType>
25+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNotInstanceOfType>
26+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNotNull>
27+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNull>
28+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsTrue>
29+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.ThrowsException>
30+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.Assert.ThrowsExceptionAsync>
1631

1732
## The `StringAssert` class
1833

19-
Use the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert> class to compare and examine strings. This class contains a variety of useful methods, such as <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.Contains%2A?displayProperty=nameWithType>, <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.Matches%2A?displayProperty=nameWithType>, and <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.StartsWith%2A?displayProperty=nameWithType>.
34+
Use the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert> class to compare and examine strings. Available APIs are:
35+
36+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.Contains>
37+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.DoesNotMatch>
38+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.EndsWith>
39+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.Matches>
40+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.StringAssert.StartsWith>
2041

2142
## The `CollectionAssert` class
2243

23-
Use the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert> class to compare collections of objects, or to verify the state of a collection.
44+
Use the <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert> class to compare collections of objects, or to verify the state of a collection. Available APIs are:
45+
46+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AllItemsAreInstancesOfType>
47+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AllItemsAreNotNull>
48+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AllItemsAreUnique>
49+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AreEqual>
50+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AreEquivalent>
51+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AreNotEqual>
52+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.AreNotEquivalent>
53+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.Contains>
54+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.DoesNotContain>
55+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.IsNotSubsetOf>
56+
- <xref:Microsoft.VisualStudio.TestTools.UnitTesting.CollectionAssert.IsSubsetOf>

0 commit comments

Comments
 (0)