Пример #1
0
        public void TearDown()
        {
            var testName    = TestContext.CurrentContext.Test.Name;
            var runOnItsOwn = testName.Contains("Sequential");

            // Console.WriteLine($"- {testName}                     this synchronises, don't use normally");

            var duration = runOnItsOwn ? 300 : 100;
            var hz       = runOnItsOwn ? 550 : 250;

            Console.Beep(hz, duration);

            Synchotron.ResourceHasFinished(testName);
        }
Пример #2
0
        public void Setup()
        {
            var testName    = TestContext.CurrentContext.Test.Name;
            var runOnItsOwn = testName.Contains("Sequential");

            if (Synchotron.ResourceIsBlocked(testName, runOnItsOwn))
            {
                while (Synchotron.ResourceIsBlocked(testName))
                {
                    // Do nothing
                }
            }
            // Console.WriteLine($"{(runOnItsOwn ? "S" : "P")} {testName}                     this synchronises, don't use normally");

            var duration = runOnItsOwn ? 300 : 100;
            var hz       = runOnItsOwn ? 500 : 200;

            Console.Beep(hz, duration);
        }