import { IUiOrderBy, UiOrderBy } from './ui-order-by';

describe('UiOrderBy', () => {
  const testData: IUiOrderBy = {
    by: 'by',
    desc: true,
    label: 'label',
  };

  let orderBy: UiOrderBy;

  beforeEach(() => {
    orderBy = UiOrderBy.create(testData);
  });

  describe('static create(inputOptions: IUiOrderByDTO)', () => {
    it('should return an instance of UiInputDTO', () => {
      expect(orderBy instanceof UiOrderBy).toBe(true);
      expect(orderBy.by).toEqual(testData.by);
      expect(orderBy.desc).toEqual(testData.desc);
      expect(orderBy.label).toEqual(testData.label);
    });
  });
});
