From 2532e1a9df8958944c66a3846bbe37cd3840d636 Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Thu, 1 Oct 2015 14:20:34 +0300 Subject: [PATCH] remove rows/columns tests added --- apps/tests/layouts/grid-layout-tests.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/apps/tests/layouts/grid-layout-tests.ts b/apps/tests/layouts/grid-layout-tests.ts index 52bbb5efa..8bbce3e8c 100644 --- a/apps/tests/layouts/grid-layout-tests.ts +++ b/apps/tests/layouts/grid-layout-tests.ts @@ -202,6 +202,26 @@ export function test_removeColumn_shouldThrow_onNullValues() { }, "removeColumn called with null should throw exception"); } +export function test_removeColumns() { + var columns = rootLayout.getColumns(); + + rootLayout.removeColumns(); + + TKUnit.assertEqual(rootLayout.getColumns().length, 0); + + columns.forEach(c=> rootLayout.addColumn(c)); +} + +export function test_removeRows() { + var rows = rootLayout.getRows(); + + rootLayout.removeRows(); + + TKUnit.assertEqual(rootLayout.getRows().length, 0); + + rows.forEach(r=> rootLayout.addRow(r)); +} + export function test_getRows_shouldNotReturnNULL() { var rows = rootLayout.getRows(); TKUnit.assert(rows, "getRows should not return null/undefinied");