1 package org.kuali.ole.ingest.controller;
2
3 import org.junit.Before;
4 import org.junit.Test;
5
6 import static junit.framework.Assert.assertFalse;
7 import static junit.framework.Assert.assertTrue;
8
9
10
11
12
13
14
15
16 public class StaffUploadController_UT {
17
18 public StaffUploadController staffUploadController;
19
20 @Before
21 public void setUp() throws Exception {
22 staffUploadController = new StaffUploadController();
23 }
24
25 @Test
26 public void testWhenRawMarcAndRawEDI() throws Exception {
27 assertTrue(staffUploadController.validateFile("iu.mrc", "iu.edi"));
28 }
29
30
31 @Test
32 public void testRawMarcAndEdiXML() throws Exception {
33 assertFalse(staffUploadController.validateFile("iu.mrc", "sample-marc.xml"));
34 }
35
36
37 @Test
38 public void testMarcXMLAndRawEdi() throws Exception {
39 assertFalse(staffUploadController.validateFile("sample-marc.xml", "iu.edi"));
40 }
41
42
43 @Test
44 public void testMarcXMLAndEdiXML() throws Exception {
45 assertTrue(staffUploadController.validateFile("sample-marc.xml", "ybp-sample-profile.xml"));
46 }
47
48
49 }