feat: add alot

This commit is contained in:
2026-10-08 04:12:36 +02:00
parent ccf5165417
commit fc607cb7bd
99 changed files with 4981 additions and 3655 deletions
+1 -42
View File
@@ -1,5 +1,5 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:kooltab2/models/product.dart';
import 'package:kooltap/models/product.dart';
void main() {
group('Product', () {
@@ -44,47 +44,6 @@ void main() {
});
});
group('formattedPrice', () {
test('formats price with euro symbol and 2 decimals', () {
const product = Product(
id: '1',
name: 'Test',
category: 'Drinks',
stockQuantity: 10,
lowStockThreshold: 5,
priceInCents: 1234,
);
expect(product.formattedPrice, '€12.34');
});
test('formats zero price correctly', () {
const product = Product(
id: '1',
name: 'Test',
category: 'Drinks',
stockQuantity: 10,
lowStockThreshold: 5,
priceInCents: 0,
);
expect(product.formattedPrice, '€0.00');
});
test('formats whole euros correctly', () {
const product = Product(
id: '1',
name: 'Test',
category: 'Drinks',
stockQuantity: 10,
lowStockThreshold: 5,
priceInCents: 500,
);
expect(product.formattedPrice, '€5.00');
});
});
group('copyWith', () {
test('creates copy with updated fields', () {
const original = Product(