feat: Equipment DTO 호환성 수정 전 백업 커밋
- Equipment DTO 필드명 변경 (name → equipment_number 등) 완료 - Phase 1-7 파생 수정사항 체계적 진행 예정 - 통합 모델 정리, Controller 동기화, UI 업데이트 예정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
test/utils/currency_formatter_test.dart
Normal file
23
test/utils/currency_formatter_test.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:superport/utils/currency_formatter.dart';
|
||||
|
||||
void main() {
|
||||
group('CurrencyFormatter Tests', () {
|
||||
test('formatKRW should format number with Korean won symbol and commas', () {
|
||||
expect(CurrencyFormatter.formatKRW(2000000), '₩2,000,000');
|
||||
expect(CurrencyFormatter.formatKRW(1000), '₩1,000');
|
||||
expect(CurrencyFormatter.formatKRW(100), '₩100');
|
||||
expect(CurrencyFormatter.formatKRW(0), '');
|
||||
expect(CurrencyFormatter.formatKRW(null), '');
|
||||
});
|
||||
|
||||
test('parseKRW should extract numeric value from formatted string', () {
|
||||
expect(CurrencyFormatter.parseKRW('₩2,000,000'), 2000000);
|
||||
expect(CurrencyFormatter.parseKRW('₩1,000'), 1000);
|
||||
expect(CurrencyFormatter.parseKRW('₩100'), 100);
|
||||
expect(CurrencyFormatter.parseKRW('2000000'), 2000000);
|
||||
expect(CurrencyFormatter.parseKRW(''), null);
|
||||
expect(CurrencyFormatter.parseKRW(null), null);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user