Skip to content

ichiko/UnitTestGenerator

Repository files navigation

UnitTestGenerator

Xcode plugin that generate swift code unit test.

Before developers end up their activity, give a chance to acknowledge famous mistake.

This project was started from try!Swift Hackathon.

How work it

What it does

Input

class Sparrow {
func fly(to_km: Int) {
}

func eat(energy: Meal) -> Bool {
// return true if enable eat
}
}

Output (Test code)

class SparrowTest {
func testFly() {}
func testFlyWithMaximam() {]
func testFlyWIthValueOutOfBounds() {}

func testEatWithMealInsect() {}
func testEatWithMealMeat() {}
}

usecase

  • create new file.
  • write class and method definitions.
  • select menu > edit > generate unit test.
  • then, add new file if need.
  • then, add method test template, that include test for covering famous mistake.

About

Generate swift code unit test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages