agentleFS
ericwood8ericwood8/skills/mstest-assertions/SKILL.md

mstest-assertions

Skill1 starsChanged 13 days agoMITView on GitHub

Use when fixing MSTEST0037 analyzer warnings or writing MSTest 3.x or 4.x assertions on collections, strings and comparisons. Trigger words - MSTEST0037, Assert.IsTrue to Assert.Contains, expected value first.

The file

Files
SKILL.md

MSTEST0037: use the specific assertion

OldNew
Assert.IsTrue(s.Contains(x))Assert.Contains(x, s)
Assert.IsFalse(s.Contains(x))Assert.DoesNotContain(x, s)
Assert.AreEqual(0, c.Count)Assert.IsEmpty(c)
Assert.AreEqual(n, c.Count)Assert.HasCount(n, c)
Assert.IsTrue(c.Count > 0)Assert.IsNotEmpty(c)
Assert.IsTrue(a < b)Assert.IsLessThan(b, a)
Assert.IsTrue(a <= b)Assert.IsLessThanOrEqualTo(b, a)
Assert.IsTrue(a > b)Assert.IsGreaterThan(b, a)
Assert.IsTrue(a >= b)Assert.IsGreaterThanOrEqualTo(b, a)
Assert.IsTrue(s.StartsWith(x))Assert.StartsWith(x, s)
Assert.IsTrue(s.EndsWith(x))Assert.EndsWith(x, s)
Assert.AreEqual(true, x)Assert.IsTrue(x)
  • The bound, substring or expected value is the first argument and the value under test the second; the optional message stays last.
  • Rebuild with --no-incremental to see every warning, then run the suite: a swapped pair compiles and fails only when the assertion would have failed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.