import { Table } from './table.model'
import { TableCombination } from './table-combination.model'
describe('TableCombination Model', () => {
	describe('get capacity method', () => {
		it.each([
			[new TableCombination({}), 0],
			[new TableCombination({ tables: [] }), 0],
			[new TableCombination({ tables: [new Table({ capacity: 5 })] }), 5],
			[
				new TableCombination({
					tables: [new Table({ capacity: 5 }), new Table({ capacity: 3 }), new Table({ capacity: 4 })],
				}),
				12,
			],
		])('should return the sum of all tables capacity', (tableCombination, capacity) => {
			expect(tableCombination.capacity).toBe(capacity)
		})
	})
})
