import { AddressHelper } from './address.helper';

describe('AddressHelper', () => {
  describe('hasRequiredProperties', () => {
    it('should return true', () => {
      const result = AddressHelper.hasRequiredProperties({ city: 'Teststadt', street: 'Teststr.', zipCode: '12345', country: 'DEU' });
      expect(result).toBeTruthy();
    });

    it('should return false if city is undefined', () => {
      const result = AddressHelper.hasRequiredProperties({ street: 'Teststr.', zipCode: '12345', country: 'DEU' });
      expect(result).toBeFalsy();
    });

    it('should return false if street is undefined', () => {
      const result = AddressHelper.hasRequiredProperties({ city: 'Teststadt', zipCode: '12345', country: 'DEU' });
      expect(result).toBeFalsy();
    });

    it('should return false if zipCode is undefined', () => {
      const result = AddressHelper.hasRequiredProperties({ city: 'Teststadt', street: 'Teststr.', country: 'DEU' });
      expect(result).toBeFalsy();
    });

    it('should return false if country is undefined', () => {
      const result = AddressHelper.hasRequiredProperties({ city: 'Teststadt', street: 'Teststr.', zipCode: '12345' });
      expect(result).toBeFalsy();
    });
  });
});
