|
|
@ -1,7 +1,6 @@ |
|
|
|
package com.fr.design.gui.itree.filetree; |
|
|
|
package com.fr.design.gui.itree.filetree; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.extension.FileExtension; |
|
|
|
import com.fr.base.extension.FileExtension; |
|
|
|
import com.fr.decision.extension.report.ReportSupportedFileProvider; |
|
|
|
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
import com.fr.design.fun.ReportSupportedFileUIProvider; |
|
|
|
import com.fr.design.fun.ReportSupportedFileUIProvider; |
|
|
|
import com.fr.design.fun.impl.AbstractReportSupportedFileUIProvider; |
|
|
|
import com.fr.design.fun.impl.AbstractReportSupportedFileUIProvider; |
|
|
@ -27,7 +26,7 @@ public class FileNodeConstantsTest { |
|
|
|
ExtraDesignClassManager extra = mockExtraDesignClassManager(); |
|
|
|
ExtraDesignClassManager extra = mockExtraDesignClassManager(); |
|
|
|
Assert.assertEquals(1, extra.getArray(ReportSupportedFileUIProvider.XML_TAG).size()); |
|
|
|
Assert.assertEquals(1, extra.getArray(ReportSupportedFileUIProvider.XML_TAG).size()); |
|
|
|
ReportSupportedFileUIProvider option = (ReportSupportedFileUIProvider) extra.getArray(ReportSupportedFileUIProvider.XML_TAG).iterator().next(); |
|
|
|
ReportSupportedFileUIProvider option = (ReportSupportedFileUIProvider) extra.getArray(ReportSupportedFileUIProvider.XML_TAG).iterator().next(); |
|
|
|
Assert.assertEquals(FileExtension.CPTX, option.getSupportedFile().getFileExtensions()[0]); |
|
|
|
Assert.assertEquals(FileExtension.CPTX, option.getFileExtensions()[0]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -54,14 +53,11 @@ public class FileNodeConstantsTest { |
|
|
|
private class MockNewTemplateFileOption extends AbstractReportSupportedFileUIProvider { |
|
|
|
private class MockNewTemplateFileOption extends AbstractReportSupportedFileUIProvider { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public ReportSupportedFileProvider getSupportedFile() { |
|
|
|
public FileExtension[] getFileExtensions() { |
|
|
|
ReportSupportedFileProvider supportedFileProvider = EasyMock.mock(ReportSupportedFileProvider.class); |
|
|
|
return new FileExtension[]{FileExtension.CPTX |
|
|
|
EasyMock.expect(supportedFileProvider.getFileExtensions()).andReturn(new FileExtension[]{FileExtension.CPTX}).anyTimes(); |
|
|
|
}; |
|
|
|
EasyMock.replay(supportedFileProvider); |
|
|
|
|
|
|
|
return supportedFileProvider; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|