Browse Source

REPORT-94637 单元测试修复@obo-com.fr.nx

release/11.0
obo 1 year ago
parent
commit
5f97183c78
  1. 6
      designer-realize/src/test/java/com/fr/nx/app/designer/CptxAppTest.java

6
designer-realize/src/test/java/com/fr/nx/app/designer/CptxAppTest.java

@ -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));

Loading…
Cancel
Save