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

Unified Diff: pkg/oauth2/test/credentials_test.dart

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 years, 11 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
« no previous file with comments | « pkg/oauth2/test/client_test.dart ('k') | pkg/oauth2/test/handle_access_token_response_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/test/credentials_test.dart
diff --git a/pkg/oauth2/test/credentials_test.dart b/pkg/oauth2/test/credentials_test.dart
index 57e31a1493981e1e3f59435b4b3f7faab9e7331e..e3f24dab8fbe30cc632031b43ac8468316b20dbc 100644
--- a/pkg/oauth2/test/credentials_test.dart
+++ b/pkg/oauth2/test/credentials_test.dart
@@ -27,14 +27,14 @@ void main() {
});
test('is not expired if the expiration is in the future', () {
- var expiration = new Date.now().add(new Duration(hours: 1));
+ var expiration = new DateTime.now().add(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', null, null, null, expiration);
expect(credentials.isExpired, isFalse);
});
test('is expired if the expiration is in the past', () {
- var expiration = new Date.now().subtract(new Duration(hours: 1));
+ var expiration = new DateTime.now().subtract(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', null, null, null, expiration);
expect(credentials.isExpired, isTrue);
@@ -124,7 +124,7 @@ void main() {
new oauth2.Credentials.fromJson(JSON.stringify(map));
test("should load the same credentials from toJson", () {
- var expiration = new Date.now().subtract(new Duration(hours: 1));
+ var expiration = new DateTime.now().subtract(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', 'refresh token', tokenEndpoint, ['scope1', 'scope2'],
expiration);
« no previous file with comments | « pkg/oauth2/test/client_test.dart ('k') | pkg/oauth2/test/handle_access_token_response_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698