public void TestThatInitializeModelInitializesCounts() { var expectedCounts = alphabet.Select(x => 1).ToList(); expectedCounts.Add(1); baseArithmeticCoding.InitializeModel(); CollectionAssert.AreEqual(expectedCounts, baseArithmeticCoding.counts); }
public void TestThatInitializeModelInitializesTotalSum() { var alphabet = new List <int> { 2, 4, 7, 10 }; var expectedTotalSum = 5; baseArithmeticCoding = new BaseArithmeticCoding(alphabet); baseArithmeticCoding.InitializeModel(); Assert.AreEqual(expectedTotalSum, baseArithmeticCoding.totalSum); }
public void TestThatInitializeModelInitializesSums() { var alphabet = new List <int> { 2, 4, 7, 10 }; var expectedSums = new List <int> { 0, 1, 2, 3, 4, 5 }; baseArithmeticCoding = new BaseArithmeticCoding(alphabet); baseArithmeticCoding.InitializeModel(); CollectionAssert.AreEqual(expectedSums, baseArithmeticCoding.sums); }