Project Description
#TestsEx (Sharp Tests Extensions) is a set of extensible extensions to work with various unit test frameworks. The main target is write short assertions where the Visual Studio IDE intellisense is your guide.

Have a look to the Syntax Overview.

Strongly typed Assertions few examples
true.Should().Be.True();
false.Should().Be.False();

const string somethig = "something";
somethig.Should().Contain("some");
somethig.Should().Not.Contain("also");
somethig.ToUpperInvariant().Should().Not.Contain("some");

somethig.Should()
    .StartWith("so")
    .And
    .EndWith("ing")
    .And
    .Contain("meth");

somethig.Should()
    .Not.StartWith("ing")
    .And
    .Not.EndWith("so")
    .And
    .Not.Contain("body");

var ints = new[] { 1, 2, 3 };
ints.Should().Have.SameSequenceAs(new[] { 1, 2, 3 });
ints.Should().Not.Have.SameSequenceAs(new[] { 3, 2, 1 });
ints.Should().Not.Be.Null();
ints.Should().Not.Be.Empty();

ints.Should()
    .Contain(2)
    .And
    .Not.Contain(4);

(new int[0]).Should().Be.Empty();

Blog posts of the author
Last edited Oct 29 at 2:12 PM by fabiomaulo, version 7

 

Want to leave feedback?
Please use Discussions or Reviews instead.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987