OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library utils_test; | 5 library utils_test; |
6 | 6 |
7 import '../../unittest/lib/unittest.dart'; | 7 import '../../../pkg/unittest/lib/unittest.dart'; |
8 import '../lib/src/utils.dart'; | 8 import '../lib/src/utils.dart'; |
9 | 9 |
10 | 10 |
11 void main() { | 11 void main() { |
12 group('AuthenticateHeader', () { | 12 group('AuthenticateHeader', () { |
13 test("parses a scheme", () { | 13 test("parses a scheme", () { |
14 var header = new AuthenticateHeader.parse('bearer'); | 14 var header = new AuthenticateHeader.parse('bearer'); |
15 expect(header.scheme, equals('bearer')); | 15 expect(header.scheme, equals('bearer')); |
16 expect(header.parameters, equals({})); | 16 expect(header.parameters, equals({})); |
17 }); | 17 }); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 expect(() => new AuthenticateHeader.parse('bearer foo="bar",'), | 82 expect(() => new AuthenticateHeader.parse('bearer foo="bar",'), |
83 throwsFormatException); | 83 throwsFormatException); |
84 }); | 84 }); |
85 | 85 |
86 test("won't parse a multiple params without a comma", () { | 86 test("won't parse a multiple params without a comma", () { |
87 expect(() => new AuthenticateHeader.parse('bearer foo="bar" bar="baz"'), | 87 expect(() => new AuthenticateHeader.parse('bearer foo="bar" bar="baz"'), |
88 throwsFormatException); | 88 throwsFormatException); |
89 }); | 89 }); |
90 }); | 90 }); |
91 } | 91 } |
OLD | NEW |