testcase 0.1.0 copy "testcase: ^0.1.0" to clipboard
testcase: ^0.1.0 copied to clipboard

Dart 1 only

A simple mirror based class wrapper around the test-package

testcase #

This library is a mirror based wrapper around the test package. The reason this package exists is to provide a more OO experience with testing dart.

Usage #

import 'package:testcase/testcase.dart';
export 'package:testcase/init.dart';

class Greeter {

  String sayHelloTo(String name) {
    return 'Hello, $name';
  }
}

class GreeterTest implements TestCase {

  Greeter greeter;

  setUp() {
    greeter = new Greeter();
  }

  tearDown() {}

  @test
  it_works() {
    // Directly exported from the test library. Keep doing your thang.
    expect(greeter.sayHelloTo('Emil'), equals('Hello, Emil'));
  }
}

Note #

To use the command 'pub run test' to run the tests (which you should), you've got to have test in your pubspec.yaml, or else the binary won't be published.

name: my_library
dev_dependencies:
  test: any
  testcase: any
$ alias pt="pub run test test/"
0
likes
15
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A simple mirror based class wrapper around the test-package

View/report issues

License

MIT (license)

Dependencies

test

More

Packages that depend on testcase