madjam002 / monounit

[WIP] BDD test framework for .NET/Mono, inspired by Jasmine (Javascript Test Framework)
MIT License
2 stars 0 forks source link

Console command to generate test skeletons #3

Open madjam002 opened 10 years ago

madjam002 commented 10 years ago

Simple classes which contain properties can easily have tests generated for them to save time.

SteveFortune commented 10 years ago

It would be cool if the framework automatically generate test skeletons for every class Eg..

class A{

     public function method1(){
           // Code..
     }

     public function method2(){
           // Code..
     }

}

.. could generate

class ATestCase{

     public function testMethod1(){
           // TODO Describes..
     }

     public function testMethod2(){
           // TODO Describes..
     }

}
madjam002 commented 10 years ago

Yeah that was what I had in mind. It would also be cool if the skeleton generator was built into the IDE plugins.

SteveFortune commented 10 years ago

You could even hook into Git somehow to generate Test class skeletons for newly added class files. Here's an example pseudo-strategy that you could implement:

if on-commit new files are added
    search then new files for 'class' definitions
    if class definition found
        prompt user to generate test skeletons