Example #1
0
        public void FindNextBiggerNumberSimpleTest2()
        {
            NumericFun numericFun = new NumericFun();
            int        expected   = 531;

            Assert.AreEqual(expected, numericFun.FindNextBiggerNumber(513).Item1);
        }
Example #2
0
        public void FindNextBiggerNumberGetTimeTest()
        {
            NumericFun numericFun = new NumericFun();
            int        expected   = 0;

            Assert.AreEqual(expected, numericFun.FindNextBiggerNumber(12431).Item2.Milliseconds);
        }
Example #3
0
        public void FindNextBiggerNumberSimpleTest10()
        {
            NumericFun numericFun = new NumericFun();
            int?       expected   = null;

            Assert.AreEqual(expected, numericFun.FindNextBiggerNumber(20).Item1);
        }
Example #4
0
        public void FindNextBiggerNumberSimpleTest8()
        {
            NumericFun numericFun = new NumericFun();
            int        expected   = 3462345;

            Assert.AreEqual(expected, numericFun.FindNextBiggerNumber(3456432).Item1);
        }
Example #5
0
        public void FindNextBiggerNumberSimpleTest7()
        {
            NumericFun numericFun = new NumericFun();
            int        expected   = 1234162;

            Assert.AreEqual(expected, numericFun.FindNextBiggerNumber(1234126).Item1);
        }
Example #6
0
        public void FindNextBiggerNumberWhenNumberLessThanZeroTest()
        {
            NumericFun numericFun = new NumericFun();

            Assert.Throws <ArgumentException>(() => numericFun.FindNextBiggerNumber(-127), "Number can't be equal to zero or less");
        }