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

20 lines
503 B

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