Skip to content

Commit

Permalink
Fixed test methods due to build failed: commit 780a171 by @towsey
Browse files Browse the repository at this point in the history
  • Loading branch information
mkholghi committed Oct 24, 2018
1 parent e452e3a commit 7c915e6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/AnalysisPrograms/AnalysisPrograms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@
<Reference Include="MathNet.Numerics, Version=3.20.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MathNet.Numerics.3.20.2\lib\net40\MathNet.Numerics.dll</HintPath>
</Reference>
<Reference Include="McMaster.Extensions.CommandLineUtils, Version=2.2.4.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d, processorArchitecture=MSIL">
<HintPath>..\..\packages\McMaster.Extensions.CommandLineUtils.2.2.4\lib\net45\McMaster.Extensions.CommandLineUtils.dll</HintPath>
<Reference Include="McMaster.Extensions.CommandLineUtils, Version=2.3.0.0, Culture=neutral, PublicKeyToken=6f71cb76b82f055d, processorArchitecture=MSIL">
<HintPath>..\..\packages\McMaster.Extensions.CommandLineUtils.2.3.0-alpha\lib\net45\McMaster.Extensions.CommandLineUtils.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
Expand Down
2 changes: 1 addition & 1 deletion src/AnalysisPrograms/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<package id="FSPowerPack.Parallel.Seq.Community" version="3.0.0.0" targetFramework="net462" />
<package id="log4net" version="2.0.8" targetFramework="net462" />
<package id="MathNet.Numerics" version="3.20.2" targetFramework="net462" />
<package id="McMaster.Extensions.CommandLineUtils" version="2.2.4" targetFramework="net462" />
<package id="McMaster.Extensions.CommandLineUtils" version="2.3.0-alpha" targetFramework="net462" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net462" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net462" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net462" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public void TestAnalyzeSr22050Recording()
var resultsDirectory = this.outputDirectory.Combine("Towsey.Acoustic");
var listOfFiles = resultsDirectory.EnumerateFiles().ToArray();

Assert.AreEqual(33, listOfFiles.Length);
Assert.AreEqual(32, listOfFiles.Length);

var csvCount = listOfFiles.Count(f => f.Name.EndsWith(".csv"));
Assert.AreEqual(16, csvCount);
Assert.AreEqual(15, csvCount);

var jsonCount = listOfFiles.Count(f => f.Name.EndsWith(".json"));
Assert.AreEqual(2, jsonCount);
Expand Down Expand Up @@ -207,10 +207,10 @@ public void TestAnalyzeSr64000Recording()
var resultsDirectory = this.outputDirectory.Combine("Towsey.Acoustic");
var listOfFiles = resultsDirectory.EnumerateFiles().ToArray();

Assert.AreEqual(20, listOfFiles.Length);
Assert.AreEqual(19, listOfFiles.Length);

var csvCount = listOfFiles.Count(f => f.Name.EndsWith(".csv"));
Assert.AreEqual(16, csvCount);
Assert.AreEqual(15, csvCount);

var jsonCount = listOfFiles.Count(f => f.Name.EndsWith(".json"));
Assert.AreEqual(2, jsonCount);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void ConcatenateEverythingYouCanLayYourHandsOn()
IndexPropertiesConfig = indexPropertiesConfig.FullName,
FalseColourSpectrogramConfig = testConfig.FullName,
ColorMap1 = LDSpectrogramRGB.DefaultColorMap1,
ColorMap2 = "BGN-POW-EVN", // POW was depracated post May 2017
ColorMap2 = "BGN-CVR-EVN", // POW was depracated post May 2017
ConcatenateEverythingYouCanLayYourHandsOn = true, // join everything found
TimeSpanOffsetHint = TimeSpan.FromHours(8),
DrawImages = true,
Expand Down Expand Up @@ -133,7 +133,7 @@ public void ConcatenateIndexFilesTest24Hour()
IndexPropertiesConfig = indexPropertiesConfig.FullName,
FalseColourSpectrogramConfig = testConfig.FullName,
ColorMap1 = LDSpectrogramRGB.DefaultColorMap1,
ColorMap2 = "BGN-POW-EVN", // POW was depracated post May 2017
ColorMap2 = "BGN-CVR-EVN", // POW was depracated post May 2017
ConcatenateEverythingYouCanLayYourHandsOn = false, // 24 hour blocks only
TimeSpanOffsetHint = TimeSpan.FromHours(8),
DrawImages = true,
Expand Down Expand Up @@ -190,7 +190,7 @@ public void ConcatenateIndexFilesTest24HourWithoutDateRange()
IndexPropertiesConfig = indexPropertiesConfig.FullName,
FalseColourSpectrogramConfig = testConfig.FullName,
ColorMap1 = LDSpectrogramRGB.DefaultColorMap1,
ColorMap2 = "BGN-POW-EVN", // POW was depracated post May 2017
ColorMap2 = "BGN-CVR-EVN", // POW was depracated post May 2017
ConcatenateEverythingYouCanLayYourHandsOn = false, // 24 hour blocks only
TimeSpanOffsetHint = TimeSpan.FromHours(8),
DrawImages = true,
Expand Down Expand Up @@ -250,7 +250,7 @@ public void ConcatenateIndexFilesTestConfigFileChanges()
var config = Yaml.Deserialize<LdSpectrogramConfig>(defaultConfigFile);

// make changes to config file as required for test
config.ColorMap1 = "BGN-ENT-POW";
config.ColorMap1 = "BGN-ENT-CVR";
config.ColorMap2 = "ACI-RNG-EVN";

// write new config
Expand Down Expand Up @@ -285,7 +285,7 @@ public void ConcatenateIndexFilesTestConfigFileChanges()
Assert.That.FileExists(outputDataDir.CombineFile(prefix + "Towsey.Acoustic.Indices.csv"));
Assert.That.FileNotExists(outputDataDir.CombineFile(prefix + "SummaryIndex.csv"));

var imageFileInfo1 = outputDataDir.CombineFile(prefix + "BGN-ENT-POW.png");
var imageFileInfo1 = outputDataDir.CombineFile(prefix + "BGN-ENT-CVR.png");
Assert.IsTrue(imageFileInfo1.Exists);

var imageFileInfo2 = outputDataDir.CombineFile(prefix + "ACI-RNG-EVN.png");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public static void ClassInitialize(TestContext context)

// do some basic checks that the indices were generated
var listOfFiles = ResultsDirectory.EnumerateFiles().ToArray();
Assert.AreEqual(20, listOfFiles.Length);
Assert.AreEqual(19, listOfFiles.Length);
var csvCount = listOfFiles.Count(f => f.Name.EndsWith(".csv"));
Assert.AreEqual(16, csvCount);
Assert.AreEqual(15, csvCount);
var jsonCount = listOfFiles.Count(f => f.Name.EndsWith(".json"));
Assert.AreEqual(2, jsonCount);
var pngCount = listOfFiles.Count(f => f.Name.EndsWith(".png"));
Expand Down

0 comments on commit 7c915e6

Please sign in to comment.