コード例 #1
0
        public void IsIt(string query, bool isAllowed)
        {
            var setIntervalCommand = new SetIntervalValueCommand();
            var value = setIntervalCommand.IsIt(query);

            Debug.WriteLine(value);
            if (value != isAllowed)
            {
                throw new Exception();
            }
        }
コード例 #2
0
        public void TestMethod1()
        {
            var setIntervalCommand = new SetIntervalValueCommand();
            var value = setIntervalCommand.ExtractValue("по 3 часов");

            Debug.WriteLine(value);
            if (value != 3)
            {
                throw new Exception();
            }
        }
コード例 #3
0
        public void TestMethod4()
        {
            var setIntervalCommand = new SetIntervalValueCommand();
            var value = setIntervalCommand.ExtractValue("по00,00часа");

            Debug.WriteLine(value);
            if (value != (decimal)0)
            {
                throw new Exception();
            }
        }
コード例 #4
0
        public void ExtractQuery(string strSource, string strResult)
        {
            var setIntervalCommand = new SetIntervalValueCommand();
            var value = setIntervalCommand.ExtractQuery(strSource);

            Debug.WriteLine(value);
            if (value != strResult)
            {
                throw new Exception();
            }
        }