Files
ChanSort/source/Test.Loader.Samsung/FileFormatDetectionTest.cs
hbeham 845c1c44c1 - fixed channel names turning from bad-byte-order-UTF16-varchar to BLOB when saving (probably the cause of Samsung J errors)
- Samsung E,F,H,J .scm file format: allow independant reordering of each favorites list (with editable numbers)
- Samsung J .zip file format: predefined lists can be edited again, allow independant reordering of each favorites list (sequential numbers), allow deleting channels
2015-11-29 20:36:56 +01:00

58 lines
1.8 KiB
C#

using System.Text;
using ChanSort.Loader.Samsung;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Test.Loader.Samsung
{
[TestClass]
public class FileFormatDetectionTest
{
private readonly StringBuilder errors = new StringBuilder();
private const string RootPath = @"d:\sources\ChanSort\TestFiles_Samsung\";
[TestMethod]
public void LoadFileWithExcessiveHighFrequency_1()
{
// this seems to be a corrupt file caused by a buffer-overflow from analog channel names into the frequency data bytes
var s = new ScmSerializer(RootPath + @"ThomasSaur_DH\channel_list_UE55H6470_1201-Suchlauf-2015-04-26.scm");
s.Load();
}
[TestMethod]
public void LoadFileWithExcessiveHighFrequency_2()
{
// this seems to be a corrupt file caused by a buffer-overflow from analog channel names into the frequency data bytes
var s = new ScmSerializer(RootPath + @"ThomasSaur_DH\channel_list_UE55H6470_1201.scm");
s.Load();
}
[TestMethod]
public void LoadRenamedFile_HE40Cxxx_1201()
{
// This file uses the 1201 format (E,F,H,J), but has a "C" in its model name
var s = new ScmSerializer(RootPath + @"__C=F\Kinig\Reier Monika.scm");
s.Load();
Assert.AreEqual("E", s.Series);
}
[TestMethod]
public void LoadRenamedFile_LT24B_1201()
{
// This file uses the 1201 format (E,F,H,J), but has a "B" in its model name
var s = new ScmSerializer(RootPath + @"__B=F\DieterHerzberg_B\renamed.scm");
s.Load();
Assert.AreEqual("E", 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("E", s.Series);
}
}
}