import 'package:flutter_test/flutter_test.dart';

import 'package:feature_wordpress/feature_wordpress.dart';

void main() {
  group('PublishStatus', () {
    test('has four values', () {
      expect(PublishStatus.values.length, 4);
    });

    test('contains expected statuses', () {
      expect(PublishStatus.values, contains(PublishStatus.draft));
      expect(PublishStatus.values, contains(PublishStatus.pendingReview));
      expect(PublishStatus.values, contains(PublishStatus.published));
      expect(PublishStatus.values, contains(PublishStatus.unpublished));
    });
  });

  group('ProductDraft', () {
    test('can be constructed with required fields', () {
      final draft = ProductDraft(
        id: '1',
        name: 'Test Product',
        description: 'A test product',
        price: 9.99,
        sku: 'TP-001',
        category: 'Test',
        imageUrl: '',
        status: PublishStatus.draft,
        lastModified: DateTime(2026, 4, 1),
      );

      expect(draft.id, '1');
      expect(draft.name, 'Test Product');
      expect(draft.description, 'A test product');
      expect(draft.price, 9.99);
      expect(draft.sku, 'TP-001');
      expect(draft.category, 'Test');
      expect(draft.imageUrl, '');
      expect(draft.status, PublishStatus.draft);
      expect(draft.lastModified, DateTime(2026, 4, 1));
    });
  });
}
