1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
thesis_shop/test/product_service_mock.dart

19 lines
503 B

import 'package:thesis_shop/models/product.dart';
import 'package:thesis_shop/service/product_service.dart';
const demoProducts = [
Product(title: 'Bananen', price: 3),
Product(title: 'Äpfel', price: 2),
Product(title: 'Birnen', price: 2.5),
Product(title: 'Kirschen', price: 1.2),
];
class MockedProductService implements ProductService {
@override
Future<List<Product>> fetchProducts() async {
return demoProducts;
}
@override
String get url => throw UnimplementedError();
}