Run() public method

public Run ( ) : void
return void
Example #1
0
        public void Run()
        {
            hMailServer.Application applicaiton = new hMailServer.Application();
            applicaiton.Authenticate("Administrator", "testar");

            // Run DNS query tests.
            TestDNSQueries test = new TestDNSQueries(applicaiton);
            test.Prepare();
            int iMemoryUsageBefore = Utilities.GetMemoryUsage();
            test.Run();
            int iMemoryUsageAfter = Utilities.GetMemoryUsage();
            int iBytesDiff = iMemoryUsageAfter - iMemoryUsageBefore;
            if (iBytesDiff > test.MaxIncrease)
                throw new Exception("Memory leak found: " + iBytesDiff.ToString() + " bytes leaked");
        }
Example #2
0
        public void Run()
        {
            hMailServer.Application applicaiton = new hMailServer.Application();
            applicaiton.Authenticate("Administrator", "testar");

            // Run DNS query tests.
            TestDNSQueries test = new TestDNSQueries(applicaiton);

            test.Prepare();
            int iMemoryUsageBefore = Utilities.GetMemoryUsage();

            test.Run();
            int iMemoryUsageAfter = Utilities.GetMemoryUsage();
            int iBytesDiff        = iMemoryUsageAfter - iMemoryUsageBefore;

            if (iBytesDiff > test.MaxIncrease)
            {
                throw new Exception("Memory leak found: " + iBytesDiff.ToString() + " bytes leaked");
            }
        }