OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library analysis_server.test.server_options; | 8 library analysis_server.test.server_options; |
9 | 9 |
10 import 'package:analysis_server/src/server_options.dart'; | 10 import 'package:analysis_server/src/server_options.dart'; |
11 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
12 | 12 |
| 13 import 'utils.dart'; |
| 14 |
13 void main() { | 15 void main() { |
14 groupSep = ' | '; | 16 initializeTestEnvironment(); |
15 | 17 |
16 group('server_options', () { | 18 group('server_options', () { |
17 test('basic - []', () { | 19 test('basic - []', () { |
18 var options = new ServerOptions.fromContents('''# ignored | 20 var options = new ServerOptions.fromContents('''# ignored |
19 foo: bar | 21 foo: bar |
20 baz: padded | 22 baz: padded |
21 '''); | 23 '''); |
22 expect(options['foo'], equals('bar')); | 24 expect(options['foo'], equals('bar')); |
23 expect(options['baz'], equals('padded')); | 25 expect(options['baz'], equals('padded')); |
24 }); | 26 }); |
(...skipping 13 matching lines...) Expand all Loading... |
38 test('basic - getStringValue', () { | 40 test('basic - getStringValue', () { |
39 var options = new ServerOptions.fromContents('''foo: someValue | 41 var options = new ServerOptions.fromContents('''foo: someValue |
40 '''); | 42 '''); |
41 expect(options.getStringValue('foo'), equals('someValue')); | 43 expect(options.getStringValue('foo'), equals('someValue')); |
42 expect(options.getStringValue('not_there'), isNull); | 44 expect(options.getStringValue('not_there'), isNull); |
43 expect(options.getStringValue('not_there', defaultValue: 'bar'), | 45 expect(options.getStringValue('not_there', defaultValue: 'bar'), |
44 equals('bar')); | 46 equals('bar')); |
45 }); | 47 }); |
46 }); | 48 }); |
47 } | 49 } |
OLD | NEW |