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

Side by Side Diff: pkg/pub_server/test/shelf_pubserver_test.dart

Issue 917793002: Use pub_server package (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « pkg/pub_server/pubspec.yaml ('k') | pkg/pubserver/lib/repository.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library pubserver.shelf_pubserver_test; 5 library pub_server.shelf_pubserver_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:shelf/shelf.dart' as shelf; 10 import 'package:shelf/shelf.dart' as shelf;
11 import 'package:pubserver/repository.dart'; 11 import 'package:pub_server/repository.dart';
12 import 'package:pubserver/shelf_pubserver.dart'; 12 import 'package:pub_server/shelf_pubserver.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 14
15 class RepositoryMock implements PackageRepository { 15 class RepositoryMock implements PackageRepository {
16 final Function downloadFun; 16 final Function downloadFun;
17 final Function downloadUrlFun; 17 final Function downloadUrlFun;
18 final Function finishAsyncUploadFun; 18 final Function finishAsyncUploadFun;
19 final Function lookupVersionFun; 19 final Function lookupVersionFun;
20 final Function startAsyncUploadFun; 20 final Function startAsyncUploadFun;
21 final Function uploadFun; 21 final Function uploadFun;
22 final Function versionsFun; 22 final Function versionsFun;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 var mock = new RepositoryMock(); 362 var mock = new RepositoryMock();
363 var server = new ShelfPubServer(mock); 363 var server = new ShelfPubServer(mock);
364 var request = new shelf.Request('GET', newUrl); 364 var request = new shelf.Request('GET', newUrl);
365 var response = await server.requestHandler(request); 365 var response = await server.requestHandler(request);
366 366
367 expect(response.statusCode, equals(404)); 367 expect(response.statusCode, equals(404));
368 }); 368 });
369 }); 369 });
370 }); 370 });
371 } 371 }
OLDNEW
« no previous file with comments | « pkg/pub_server/pubspec.yaml ('k') | pkg/pubserver/lib/repository.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698