cleanup, documentation, unit tests

This commit is contained in:
hbeham
2015-11-28 20:50:52 +01:00
parent 19df8e984d
commit e795d00ebb
7 changed files with 28 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Linq;
@@ -165,8 +164,8 @@ namespace ChanSort.Loader.Samsung
case "1101": series = "D"; break;
case "1201":
var letter = match.Groups[2].Value;
// F, H and low-end J series use same file format
// E, F, H and low-end J series use same file format
// E however allows individually sorted favorites while the other require the fav number to be equal to the main program nr
series = letter == "E" ? "E" : "F";
break;
default:
@@ -694,8 +693,8 @@ namespace ChanSort.Loader.Samsung
private void RemoveDuplicateAnalogList(StringBuilder log)
{
if (this.avbtChannels.Count == 0 || this.avbcChannels.Count == 0)
return;
//if (this.avbtChannels.Count == 0 || this.avbcChannels.Count == 0)
// return;
// TODO
}
@@ -703,11 +702,11 @@ namespace ChanSort.Loader.Samsung
// ------- testing -----------
internal string Series { get { return c.series; } }
internal int AnalogChannelLength { get { return c.avbtChannelLength; } }
internal int DigitalChannelLength { get { return c.dvbtChannelLength; } }
internal int SatChannelLength { get { return c.dvbsChannelLength; } }
internal int HdPlusChannelLength { get { return c.hdplusChannelLength; } }
internal string Series => c.series;
internal int AnalogChannelLength => c.avbtChannelLength;
internal int DigitalChannelLength => c.dvbtChannelLength;
internal int SatChannelLength => c.dvbsChannelLength;
internal int HdPlusChannelLength => c.hdplusChannelLength;
internal int SatDatabaseVersion { get; private set; }
}
}

View File

@@ -25,7 +25,7 @@ namespace ChanSort.Ui
{
public partial class MainForm : XtraForm
{
public const string AppVersion = "v2015-11-27";
public const string AppVersion = "v2015-11-28";
private const int MaxMruEntries = 10;

View File

@@ -81,5 +81,14 @@ namespace Test.Loader.Samsung
Assert.AreEqual("F", s.Series);
}
[TestMethod]
public void LoadJSeriesWithScm1201Format()
{
// J-series model with SCM format
var s = new ScmSerializer(RootPath + @"__J\HenryLoenwind_SCM\channel_list_UE32J5170_1201_orig.scm");
s.Load();
Assert.AreEqual("F", s.Series);
}
}
}

View File

@@ -73,6 +73,7 @@
<ItemGroup>
<Compile Include="FileFormatDetectionTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SamsungTest.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ChanSort.Api\ChanSort.Api.csproj">
@@ -83,6 +84,10 @@
<Project>{a1c9a98d-368a-44e8-9b7f-7eaca46c9ec5}</Project>
<Name>ChanSort.Loader.Samsung</Name>
</ProjectReference>
<ProjectReference Include="..\Test.Loader\Test.Loader.csproj">
<Project>{68cfcb2f-b52a-43a1-aa5c-5d64a1d655d2}</Project>
<Name>Test.Loader</Name>
</ProjectReference>
</ItemGroup>
<Choose>
<When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'">

View File

@@ -66,7 +66,6 @@
<Compile Include="LgTest.cs" />
<Compile Include="LoaderTestBase.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SamsungTest.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ChanSort.Api\ChanSort.Api.csproj">

View File

@@ -1,6 +1,9 @@
ChanSort Change Log
===================
2015-11-28
- fixed file format detection for Samsung J series models with .scm file extension
2015-11-27
- disable editing of predefined channel lists (based on LCN).
TVs can show erratic behavior when a predefined list is modified.