Skip to content

Commit

Permalink
fix testcases runtime configuration issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyqus committed Dec 4, 2018
1 parent e6deb11 commit 4b6265b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
8 changes: 6 additions & 2 deletions main/HSSF/UserModel/StaticFontMetrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ namespace NPOI.HSSF.UserModel
*/
class StaticFontMetrics
{
const string FONT_METRICS_PROPERTIES_FILE_NAME = "font_metrics.properties";

#if NETSTANDARD2_0
private const String FONT_METRICS_PROPERTIES_FILE_NAME = "NPOI.Resources.font_metrics.properties";
#else
private const String FONT_METRICS_PROPERTIES_FILE_NAME = "font_metrics.properties";
#endif

/** The font metrics property file we're using */
private static Properties fontMetricsProps;
/** Our cache of font details we've alReady looked up */
Expand Down
8 changes: 1 addition & 7 deletions testcases/ooxml/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,8 @@
</sectionGroup>
</configSections>
<appSettings>
<add key="POI.testdata.path" value="..\..\..\testcases\test-data"/>
<add key="POI.testdata.path" value="..\..\..\..\test-data"/>
</appSettings>
<system.diagnostics>
<switches>
<!-- Store the Source file of the [De-]Serialization process accessible for Debugging. -->
<add name="XmlSerialization.Compilation" value="1"/>
</switches>
</system.diagnostics>
<userSettings>
<ooxml.Testcases.Properties.Settings>
<setting name="TEST_PROPERTY" serializeAs="String">
Expand Down
2 changes: 1 addition & 1 deletion testcases/ooxml/SS/TestWorkbookFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void TestCreateGeneric()
Assert.IsTrue(wb is XSSFWorkbook);
// File -> either
wb = WorkbookFactory.Create(
testdataPath + xls
Path.GetFullPath(testdataPath + xls)
);
Assert.IsNotNull(wb);
Assert.IsTrue(wb is HSSFWorkbook);
Expand Down
2 changes: 1 addition & 1 deletion testcases/openxml4net/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="POI.testdata.path" value="..\..\..\TestCases\test-data"/>
<add key="POI.testdata.path" value="..\..\..\..\test-data"/>
</appSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>

0 comments on commit 4b6265b

Please sign in to comment.