Beispiel #1
0
        public void BoxScan_GetBoxIds_ReadsDataFromFile()
        {
            var scan = new BoxScan();

            var ids = scan.GetBoxIds();

            Assert.IsTrue(ids.Any());
        }
Beispiel #2
0
        public void BoxScan_RemoveDifferentLetters_ActualAnswer()
        {
            var scan = new BoxScan();

            var actual   = scan.RemoveDifferentLetters("qcslyvphgkrmrdawljuefotxbh", "qcslyvphgkrmddawljuefotxbh");
            var expected = "qcslyvphgkrmdawljuefotxbh";

            Assert.AreEqual(expected, actual);
        }
Beispiel #3
0
        public void BoxScan_RemoveDifferentLetters()
        {
            var scan = new BoxScan();

            var actual   = scan.RemoveDifferentLetters("fghij", "fguij");
            var expected = "fgij";

            Assert.AreEqual(expected, actual);
        }
Beispiel #4
0
        public void BoxScan_FindCommonLetters()
        {
            var scan = new BoxScan();
            var ids  = GetSimiliarExampleData();

            var actual   = scan.FindCommonLetters(ids);
            var expected = new Tuple <string, string>("fghij", "fguij");

            Assert.AreEqual(expected, actual);
        }
Beispiel #5
0
        public void BoxScan_CountThreeTimesAppearingLetters()
        {
            var ids  = GetExampleData();
            var scan = new BoxScan();

            var actual   = scan.CountMultipleAppearingLetters(ids, 3);
            var expected = 3;

            Assert.AreEqual(expected, actual);
        }
Beispiel #6
0
        public void BoxScan_CheckSum()
        {
            var scan   = new BoxScan();
            var first  = 4;
            var second = 3;

            var actual   = scan.GenerateBoxCheckSum(first, second);
            var expected = 12;

            Assert.AreEqual(expected, actual);
        }