|
|
@ -4,7 +4,6 @@ import com.fr.file.AbstractFILE; |
|
|
|
import com.fr.file.FILE; |
|
|
|
import com.fr.file.FILE; |
|
|
|
import com.fr.main.impl.WorkBook; |
|
|
|
import com.fr.main.impl.WorkBook; |
|
|
|
import com.fr.nx.cptx.utils.CptxFileUtils; |
|
|
|
import com.fr.nx.cptx.utils.CptxFileUtils; |
|
|
|
import org.easymock.EasyMock; |
|
|
|
|
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.Assert; |
|
|
|
import org.junit.FixMethodOrder; |
|
|
|
import org.junit.FixMethodOrder; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
@ -42,12 +41,9 @@ public class CptxAppTest { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
WorkBook workBook = new WorkBook(); |
|
|
|
WorkBook workBook = new WorkBook(); |
|
|
|
EasyMock.expect(CptxFileUtils.getWorkBook(file.getPath())) |
|
|
|
|
|
|
|
.andReturn(workBook).once() |
|
|
|
|
|
|
|
.andReturn(null).once(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PowerMock.replay(CptxFileUtils.class); |
|
|
|
PowerMock.replay(CptxFileUtils.class); |
|
|
|
Assert.assertSame(workBook, new CptxApp().asIOFile(file)); |
|
|
|
Assert.assertTrue(workBook.equals(new CptxApp().asIOFile(file))); |
|
|
|
|
|
|
|
|
|
|
|
Assert.assertNotNull(new CptxApp().asIOFile(file)); |
|
|
|
Assert.assertNotNull(new CptxApp().asIOFile(file)); |
|
|
|
|
|
|
|
|
|
|
|