import 'package:flutter_test/flutter_test.dart'; import 'package:fikoyt_studyo/resim/resim_sihirbaz_secimleri.dart'; void main() { test('karakter modu: tüm temel alanlar prompta derlenir', () { final s = ResimSihirbazSecimleri( modu: ResimModu.karakter, cinsiyet: 'woman', yas: 28, etnik: 'turkish', tenRengi: 'olive', sacRengi: 'brown', sacUzunluk: 'long', sacStili: 'wavy', gozRengi: 'hazel', kiyafetTipi: 'casual', kiyafetRengi: 'beige', ruhHali: 'happy', pozTipi: 'half_body', aksesuarlar: {'earrings'}, sanatStili: 'cinematic_s', isiklandirma: 'golden_hour_l', ); final p = s.promptDerle(); expect(p, contains('28 years old Turkish woman')); expect(p, contains('olive skin')); expect(p, contains('long wavy brown hair')); expect(p, contains('hazel eyes')); expect(p, contains('wearing beige casual outfit')); expect(p, contains('happy expression')); expect(p, contains('half body shot')); expect(p, contains('earrings')); expect(p, contains('cinematic film still')); expect(p, contains('golden hour')); }); test('mekan modu: lokasyon + saat + hava derlenir', () { final s = ResimSihirbazSecimleri( modu: ResimModu.mekan, spesifikMekan: 'cyberpunk_city', saatDilimi: 'night', hava: 'rainy', atmosfer: 'dystopian', lens: '24mm', ); final p = s.promptDerle(); expect(p, contains('cyberpunk neon-lit megacity')); expect(p, contains('night scene')); expect(p, contains('rainy wet streets')); expect(p, contains('dystopian bleak atmosphere')); expect(p, contains('24mm wide angle lens')); }); test('ürün modu: kategori + marka + materyal + arka plan', () { final s = ResimSihirbazSecimleri( modu: ResimModu.urun, urunKategori: 'watch', urunMarka: 'Rolex', urunRenk: 'gold', urunMateryal: 'gold_mat', urunArkaPlan: 'black_studio', urunAcisi: 'hero_shot', urunProps: {'leaves'}, ); final p = s.promptDerle(); expect(p, contains('gold colored Rolex branded watch')); expect(p, contains('gold material')); expect(p, contains('matte black studio background')); expect(p, contains('hero product shot')); expect(p, contains('green leaves')); expect(p, contains('professional product photography')); }); test('negatif: fotoreel seti tam set + kullanıcı eki birleşir', () { final s = ResimSihirbazSecimleri( negatifSet: 'fotoreel', kullaniciNegatif: 'smudged makeup', ); final n = s.negatifDerle(); expect(n, contains('low quality')); expect(n, contains('extra fingers')); expect(n, contains('cartoon, anime')); expect(n, contains('smudged makeup')); }); test('negatif: yok seçilirse boş (yalnız kullanıcı eki)', () { final s = ResimSihirbazSecimleri( negatifSet: 'yok', kullaniciNegatif: 'just this'); expect(s.negatifDerle(), 'just this'); }); test('NSFW kapalıyken prompta hiç NSFW girmez', () { final s = ResimSihirbazSecimleri( modu: ResimModu.karakter, cinsiyet: 'woman', nsfwAcik: false, nsfwSeviye: 'explicit', nsfwSecimler: {'large_b'}, ); final p = s.promptDerle(); expect(p, isNot(contains('explicit'))); expect(p, isNot(contains('large breasts'))); }); test('NSFW açıkken seviye + seçimler + gerçekçilik eki girer', () { final s = ResimSihirbazSecimleri( modu: ResimModu.karakter, cinsiyet: 'woman', nsfwAcik: true, nsfwSeviye: 'nude', nsfwSecimler: {'large_b', 'lying_bed', 'lace'}, ); final p = s.promptDerle(); expect(p, contains('fully nude')); expect(p, contains('large breasts')); expect(p, contains('lying seductively on bed')); expect(p, contains('lace lingerie')); expect(p, contains('realistic skin texture')); }); test('json round-trip (tüm alanlar)', () { final s = ResimSihirbazSecimleri( modu: ResimModu.mekan, cinsiyet: 'man', yas: 40, etnik: 'european', sacRengi: 'black', spesifikMekan: 'cafe', saatDilimi: 'evening', aksesuarlar: {'glasses', 'watch'}, urunProps: {'leaves', 'flowers'}, kaliteEtiketleri: {'ultra_detailed', '8k'}, negatifSet: 'anime', kullaniciNegatif: 'extra eyes', ekstraNot: 'shallow depth of field', ); final geri = ResimSihirbazSecimleri.fromJson(s.toJson()); expect(geri.modu, ResimModu.mekan); expect(geri.yas, 40); expect(geri.aksesuarlar, {'glasses', 'watch'}); expect(geri.urunProps, {'leaves', 'flowers'}); expect(geri.kaliteEtiketleri, {'ultra_detailed', '8k'}); expect(geri.negatifSet, 'anime'); expect(geri.kullaniciNegatif, 'extra eyes'); expect(geri.ekstraNot, 'shallow depth of field'); }); }