Telerik blogs

The unit test runner in Telerik JustCode has supported five different unit testing frameworks: MSTest, xUnit, NUnit 2.5, MSPec, and MbUnit 2.4. MbUnit 3 is significantly different than prior iterations by having a different underlying engine: the Gallio Test Automation Platform. The newly released service pack for JustCode supports this framework, allowing you to take advantage of its many features.

You can get started with MbUnit 3 with the assemblies provided by JustCode or downloading and installing the latest Gallio package. Afterwards, create a class library and add references to the Gallio and MbUnit assemblies. These can be found in %ProgramFiles(x86)%\Telerik\JustCode\Libraries\Extensions or the GAC if the Gallio package was installed. Setting up your first test is similar to other frameworks: simply mark your methods with the Test attribute. Note: TestFixture is optional for MbUnit but is currently required for the JustCode test runner.

[TestFixture]
public class WhenEnumList
{
    [Test]
    public void IsCreatedShouldBeValidAndReturnFirstValue()
    {
        var roles = new EnumList<Role>();
        Assert.AreEqual(Role.Author, roles.First());
    }
}

This executes in the test runner as expected.

Test Runner

This version of JustCode does not support DynamicTestFactory or StaticTestFactory, but we are working on adding it in a future release. Let us know how you are using MbUnit 3 and what we can do to improve the experience for you.

MbUnit 3 contains many advanced unit testing feature; take a look through the documentation to discover ways in which you can ensure your code is covered and bug-free. We are proud to support this test suite for JustCode users!


About the Author

Chris Eargle

is a Microsoft C# MVP with over a decade of experience designing and developing enterprise applications, and he runs the local .NET User Group: the Columbia Enterprise Developers Guild. He is a frequent guest of conferences and community events promoting best practices and new technologies. Chris is a native Carolinian; his family settled the Dutch Form region of South Carolina in 1752. He currently resides in Columbia with his wife, Binyue, his dog, Laika, and his three cats: Meeko, Tigger, and Sookie. Amazingly, they all get along... except for Meeko, who is by no means meek.

Related Posts

Comments

Comments are disabled in preview mode.