Permalink
Browse files

doc: Test for Emitter added

  • Loading branch information...
MikeMitterer committed Dec 18, 2015
1 parent e0e494a commit ff0c53024431672b20e9f282a08e710a026c2c34
Showing with 41 additions and 0 deletions.
  1. +41 −0 test/unit/flux/Emitter_test.dart
@@ -0,0 +1,41 @@
import 'package:test/test.dart';
import 'package:mdl/mdlflux.dart';
// import 'package:logging/logging.dart';
import '../config.dart';
class MyEmitter extends Emitter {
void changeSomething() {
emitChange();
}
}
main() async {
// final Logger _logger = new Logger("test.Emitter");
configLogging();
final MyEmitter emitter = new MyEmitter();
group('Emitter', () {
setUp(() { });
test('> onChange', () {
emitter.onChange.listen( expectAsync( (final DataStoreChangedEvent event) {
expect(event,isNotNull);
expect(event.data,new isInstanceOf<UpdateView>());
}));
emitter.changeSomething();
}); // end of 'onChange' test
});
// End of 'Emitter' group
}
// - Helper --------------------------------------------------------------------------------------

0 comments on commit ff0c530

Please sign in to comment.