public void insertExecutionFlowWithNoMethodCallPO()
 {
     ExecutionFlowPO flow= new ExecutionFlowPO("TEST-main", null, "myCLR");
      IExecutionFlowWriter dao = new ExecutionFlowDao();
      int nbMethodsCallBeforeDao = UtilTest.CountMethods();
      dao.InsertFullExecutionFlow(flow);
      Thread.Sleep(SLEEP_DURATION_FOR_ASYNC_WRITE);
      int nbMethodsCallAfterDao = UtilTest.CountMethods();
      UtilTest.DeleteAllData();
      Assert.AreEqual(nbMethodsCallAfterDao, nbMethodsCallBeforeDao);
 }
 public void insertExecutionFlowWithRecursiveMethodCallPO()
 {
     ExecutionFlowPO flow = UtilTest.buildNewFullFlow();
     IExecutionFlowWriter dao = new ExecutionFlowDao();
     int nbMethodsCallBeforeDao = UtilTest.CountMethods();
     dao.InsertFullExecutionFlow(flow);
     Thread.Sleep(SLEEP_DURATION_FOR_ASYNC_WRITE);
     int nbMethodsCallAfterDao = UtilTest.CountMethods();
     int nbExpextedMethodsCall = 3;
     UtilTest.DeleteAllData();
     Assert.AreEqual(nbExpextedMethodsCall, nbMethodsCallAfterDao - nbMethodsCallBeforeDao);
 }
        public void insertExecutionFlowWithOneMethodCallPOUsingConstructor()
        {
            long tStartTime = Util.CurrentTimeMillis();
            MethodCallPO    point=  new MethodCallPO(null, "TestExecutionFlowDAO", "builNewFlow", "GrDefault", new ParameterInfo[0]);
            point.BeginTime = tStartTime;
            point.EndTime = tStartTime + 2;

            ExecutionFlowPO flow = new ExecutionFlowPO("TEST-main", point, "myCLR");

            IExecutionFlowWriter dao = new ExecutionFlowDao();

            int nbMethodsCallBeforeDao = UtilTest.CountMethods();
            dao.InsertFullExecutionFlow(flow);
            Thread.Sleep(SLEEP_DURATION_FOR_ASYNC_WRITE);
            int nbMethodsCallAfterDao = UtilTest.CountMethods();
            int nbExpextedMethodsCall = 1;
            UtilTest.DeleteAllData();
            Assert.AreEqual(nbExpextedMethodsCall,nbMethodsCallAfterDao - nbMethodsCallBeforeDao);
        }