root / hci / trunk / .metadata / .plugins / org.eclipse.core.resources / .history / bb / c0d3e7e9381100101d6fba8584f33802 @ 3
History | View | Annotate | Download (589 Bytes)
1 | 3 | alexbesir | package com.eneraptor.hci |
---|---|---|---|
2 | |||
3 | import grails.test.* |
||
4 | |||
5 | class InternalConfigTests extends GrailsUnitTestCase { |
||
6 | protected void setUp() { |
||
7 | super.setUp() |
||
8 | } |
||
9 | |||
10 | protected void tearDown() { |
||
11 | super.tearDown() |
||
12 | } |
||
13 | |||
14 | void testConstructor() { |
||
15 | |||
16 | def config1 = new InternalConfig(configId: 'Configuration1', configVal: 'value1') |
||
17 | assertEquals(config1.configId as boolean, "Configuration1") |
||
18 | assertEquals(config1.configVal as boolean, "value1") |
||
19 | config1.save(flush: true) |
||
20 | assertEquals(true, InternalConfig.findByConfigId("Configuration1") as boolean) |
||
21 | |||
22 | |||
23 | } |
||
24 | } |