Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: client/tests/client/observable/ObservableValueTests.dart

Issue 8348016: Clean up observable tests to new API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment about architecture.py. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/tests/client/observable/ObservableValueTests.dart
diff --git a/client/tests/client/observable/ObservableValueTests.dart b/client/tests/client/observable/ObservableValueTests.dart
index e5f7e247f35c070cc58b3e1b70eb2d469922e463..feaea382c7f85e0c3cb3a84e1756ac165a69251e 100644
--- a/client/tests/client/observable/ObservableValueTests.dart
+++ b/client/tests/client/observable/ObservableValueTests.dart
@@ -2,16 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-class ObservableValueTests extends ObservableTestSetBase {
- // TODO(rnystrom): Remove this when default constructors are supported.
- ObservableValueTests() : super();
-
- setup() {
- addTest(testObservableValue);
- addTest(testObservableValueDoesNotRaiseEventIfUnchanged);
- }
-
- void testObservableValue() {
+testObservableValue() {
+ test('ObservableValue', () {
final value = new ObservableValue<String>('initial');
expect(value.value).equals('initial');
@@ -31,11 +23,10 @@ class ObservableValueTests extends ObservableTestSetBase {
expect(result).isNotNull();
expect(result.events.length).equals(1);
- checkEvent(result.events[0],
- value, 'value', null, ChangeEvent.UPDATE, 'newer', 'new');
- }
+ validateUpdate(result.events[0], value, 'value', null, 'newer', 'new');
+ });
- void testObservableValueDoesNotRaiseEventIfUnchanged() {
+ test('does not raise event if unchanged', () {
final value = new ObservableValue<String>('foo');
expect(value.value).equals('foo');
@@ -47,5 +38,5 @@ class ObservableValueTests extends ObservableTestSetBase {
// Should not have gotten an event.
expect(called).equals(false);
- }
+ });
}
« no previous file with comments | « client/tests/client/observable/ObservableTestSetBase.dart ('k') | client/tests/client/observable/observable_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698