public void TestMethod1()
        {
            UnitTestCase customLogic = new UnitTestCase();
            var          result      = customLogic.AddTwoPostiveNumber(10, 20);

            Assert.IsTrue(result == 30);
        }
Example #2
0
        private async Task RunUnitTestCase(UnitTestCase c, bool verbose)
        {
            UnitTestCaseState newState = UnitTestCaseState.NotRun;
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                RunningTestCase = c;
            });

            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                c.Traces.Clear();
            });

            c.Dispatcher = Dispatcher;
            if (LibLinphoneTester.Instance.run(c.Suite.Name, c.Name, verbose))
            {
                newState = UnitTestCaseState.Failure;
            }
            else
            {
                newState = UnitTestCaseState.Success;
            }
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                c.State = newState;
                ProgressIndicator.Value += 1;
                if (ProgressIndicator.Value == ProgressIndicator.Maximum)
                {
                    UnprepareRun();
                }
            });
        }
Example #3
0
        public void TestMethod1()//This is unit test case function
        {
            UnitTestCase customLogic = new UnitTestCase();
            var          result      = customLogic.AddTwoPostiveNumber(10, 20);

            Assert.IsTrue(result == 30);
        }
        public void CheckDbConnConfig()
        {
            UnitTestCase customLogic = new UnitTestCase();
            var          result      = customLogic.ValidateDBConnectionSctring();

            Assert.IsTrue(result);
        }
Example #5
0
        private void RunSingle_Click(object sender, RoutedEventArgs e)
        {
            PrepareRun(1);

            var tup = new Tuple <UnitTestCase, bool?>(DisplayedTestCase, Verbose.IsChecked);
            var t   = Task.Factory.StartNew(async(object parameters) =>
            {
                var p          = parameters as Tuple <UnitTestCase, bool?>;
                UnitTestCase c = p.Item1;
                bool verbose   = p.Item2 != null ? (bool)p.Item2 : false;
                await RunUnitTestCase(c, verbose);
            }, tup);
        }