View Javadoc
1   /**
2    * Copyright 2004-2014 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.kpme.core.block;
17  
18  import static org.junit.Assert.assertEquals;
19  import static org.junit.Assert.assertNotNull;
20  import static org.junit.Assert.assertNull;
21  
22  import java.util.List;
23  
24  import org.codehaus.groovy.tools.shell.util.Logger;
25  import org.junit.Test;
26  import org.kuali.kpme.core.CoreUnitTestCase;
27  import org.kuali.kpme.core.IntegrationTest;
28  import org.kuali.kpme.core.service.HrServiceLocator;
29  
30  @IntegrationTest
31  public class CalendarBlockServiceImplTest extends CoreUnitTestCase {
32  
33  	private static Logger LOG = Logger.create(CalendarBlockServiceImplTest.class);
34  	
35  	@Override
36  	public void setUp() throws Exception {
37  		super.setUp();
38  	}
39  	
40  	@Override
41  	public void tearDown() throws Exception {
42  		super.tearDown();
43  	}
44  	
45  	@Test
46  	public void testGetAllCalendarBlocks() {
47  		assertNull(null);
48  		List<CalendarBlock> calendarBlocks = (List<CalendarBlock>) HrServiceLocator.getCalendarBlockService().getAllCalendarBlocks();
49  		assertEquals("number of returned entries should be 2", 2, calendarBlocks.size());
50  		for(CalendarBlock calendarBlock : calendarBlocks) {
51  			assertNotNull("Concrete block id should never be null", calendarBlock.getConcreteBlockId());
52  			assertNotNull("Concrete block type should never be null", calendarBlock.getConcreteBlockType());
53  		}
54  	}
55  	
56  }