Пример #1
0
 public void LongNamespaceTest()
 {
     NunitGo.EventStarted("Checking something");
     Thread.Sleep(500);
     NunitGo.EventFinished("Checking something");
     Assert.AreEqual(1, 1);
 }
Пример #2
0
 public void ParamTestName2(string input, int expected, string guid)
 {
     NunitGo.SetTestGuid(guid);
     Thread.Sleep(200);
     NunitGo.EventStarted("Test event 1");
     Thread.Sleep(200);
     NunitGo.EventFinished("Test event 1");
     Assert.AreEqual(input, expected.ToString("D"));
 }
Пример #3
0
 public void UnsuccessTestThreeEvents()
 {
     //first test event
     NunitGo.EventStarted("Checking something");
     Thread.Sleep(500);
     NunitGo.EventFinished("Checking something");
     //second test event
     NunitGo.EventStarted("Some operation time");
     Thread.Sleep(200);
     //third test event - test fails
     NunitGo.EventStarted("Suboperation time");
     Assert.AreEqual(1, 2);
     NunitGo.EventFinished("Suboperation time");
     NunitGo.EventFinished("Some operation time");
 }
Пример #4
0
        public void SuccessTestThreeEvents()
        {
            var r = new Random();

            //first test event
            NunitGo.EventStarted(EventName1);
            Thread.Sleep(r.Next(500));
            NunitGo.EventFinished(EventName1);
            //second test event
            NunitGo.EventStarted("Checking some stuff 2");
            Thread.Sleep(200);
            //third test event
            NunitGo.EventStarted("Checking some stuff 3");
            Thread.Sleep(r.Next(1000));
            NunitGo.EventFinished("Checking some stuff 3");
            NunitGo.EventFinished("Checking some stuff 2");
            Thread.Sleep(r.Next(700));
            Assert.AreEqual(1, 1);
        }