Skip to content
/ TestMe Public

Testing out some ideas for self contained unit testing

License

Notifications You must be signed in to change notification settings

hbbq/TestMe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TestMe

A helper library to enable self contained unit testing

Possibility to create test cases for methods just by adding some attributes to the method itself:

public class TestableClassA
{

    [TestMe.NoParameters(true)] //Sets up a test case that expects this method to return <true>
    public bool ReturnTrue() => true;

    [TestMe.NoParameters(false)] //Sets up a test case that expects this method to return <false>
    public bool ReturnFalse() => false;

    [TestMe.SingleParameter(1, 2)] //Sets up a test case that expects this method to return <2> for the parameter <1>
    [TestMe.SingleParameter(2, 4)] //Sets up a test case that expects this method to return <4> for the parameter <2>
    public int TimesTwo(int value) => value * 2;
    
}

About

Testing out some ideas for self contained unit testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages