Exemple #1
0
        public void ToBinaryBoundaryCases()
        {
            List <int> input = new List <int> {
                0, 1, 1023
            };
            List <int> output   = ToBinaryFilter.ToBinary(input);
            List <int> expected = new List <int> {
                0, 1, 1111111111
            };

            CollectionAssert.AreEqual(expected, output);
        }
Exemple #2
0
        public void ToBinaryFail()
        {
            List <int> input = new List <int> {
                0, 10, 100
            };
            List <int> output      = ToBinaryFilter.ToBinary(input);
            List <int> wrongValues = new List <int> {
                2, 4, 6
            };

            CollectionAssert.AreNotEqual(output, wrongValues);
        }
Exemple #3
0
        public void ToBinarySimplePasses()
        {
            List <int> input = new List <int> {
                2, 4, 10
            };
            List <int> output   = ToBinaryFilter.ToBinary(input);
            List <int> expected = new List <int> {
                10, 100, 1010
            };

            CollectionAssert.AreEqual(expected, output);
        }