import { DataAccessError } from './data-access.error';
import { PropertyIsEmptyError } from './property-is-empty.error';

describe('PropertyIsEmptyError', () => {
  it('should create an error with the correct code and message', () => {
    // Arrange
    const propertyName = 'username';

    // Act
    const error = new PropertyIsEmptyError(propertyName);

    // Assert
    expect(error).toBeInstanceOf(PropertyIsEmptyError);
    expect(error).toBeInstanceOf(DataAccessError);
    expect(error.code).toBe('PROPERTY_IS_EMPTY');
    expect(error.message).toBe(`Property "${propertyName}" is empty.`);
  });
});
