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.*;
19  
20  import java.util.List;
21  
22  import org.codehaus.groovy.tools.shell.util.Logger;
23  import org.junit.Test;
24  import org.kuali.kpme.core.CoreUnitTestCase;
25  import org.kuali.kpme.core.IntegrationTest;
26  import org.kuali.kpme.core.service.HrServiceLocator;
27  
28  @IntegrationTest
29  public class CalendarBlockServiceImplTest extends CoreUnitTestCase {
30  
31  	private static Logger LOG = Logger.create(CalendarBlockServiceImplTest.class);
32  	
33  	@Override
34  	public void setUp() throws Exception {
35  		super.setUp();
36  	}
37  	
38  	@Override
39  	public void tearDown() throws Exception {
40  		super.tearDown();
41  	}
42  	
43  	@Test
44  	public void testGetAllCalendarBlocks() {
45  		assertNull(null);
46  		List<CalendarBlock> calendarBlocks = HrServiceLocator.getCalendarBlockService().getAllCalendarBlocks();
47  		assertEquals("number of returned entries should be 2", 2, calendarBlocks.size());
48  		for(CalendarBlock calendarBlock : calendarBlocks) {
49  			assertNotNull("Concrete block id should never be null", calendarBlock.getConcreteBlockId());
50  			assertNotNull("Concrete block type should never be null", calendarBlock.getConcreteBlockType());
51  		}
52  	}
53  	
54  }