Пример #1
0
        //input: [824,938,1399,5607,6973,5703,9609,4398,8247]
        //expected: "9609938824824769735703560743981399"
        public void LargestNumberTest()
        {
            int[]  input    = new int[] { 824, 938, 1399, 5607, 6973, 5703, 9609, 4398, 8247 };
            string expected = "9609938824824769735703560743981399";
            MyTask target   = new MyTask();
            string result   = target.LargestNumber(input);

            Assert.AreEqual(expected, result);
        }
Пример #2
0
        public void LargestNumberTest_input_arr_3_30_34_5_9_output_9534330()
        {
            int[]  input    = new int[] { 3, 30, 34, 5, 9 };
            string expected = "9534330";
            MyTask target   = new MyTask();
            string result   = target.LargestNumber(input);

            Assert.AreEqual(expected, result);
        }
Пример #3
0
        public void LargestNumberTest_input_arr_121_12_output_12121()
        {
            int[]  input    = new int[] { 121, 12 };
            string expected = "12121";
            MyTask target   = new MyTask();
            string result   = target.LargestNumber(input);

            Assert.AreEqual(expected, result);
        }
Пример #4
0
        public void LargestNumberTest_input_arr_0_0_output_0()
        {
            int[]  input    = new int[] { 0, 0 };
            string expected = "0";
            MyTask target   = new MyTask();
            string result   = target.LargestNumber(input);

            Assert.AreEqual(expected, result);
        }