public void SafeWait_Success_Immediate()
 {
     using (StopwatchAsserter.WithinSeconds(0, .01))
         wait.Until(_ =>
         {
             return(true);
         });
 }
        private void RunTestApp()
        {
            _coreRunProcess = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName         = "cmd.exe",
                    Arguments        = "/c dotnet run",
                    WorkingDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..\\..\\..\\..\\Atata.Bootstrap.TestApp")
                }
            };

            _coreRunProcess.Start();

            Thread.Sleep(5000);

            var testAppWait = new SafeWait <SetUpFixture>(this)
            {
                Timeout         = TimeSpan.FromSeconds(40),
                PollingInterval = TimeSpan.FromSeconds(1)
            };

            testAppWait.IgnoreExceptionTypes(typeof(WebException));

            testAppWait.Until(x => PingTestApp());
        }
Beispiel #3
0
        private void RunTestApp()
        {
            string testAppPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "..", "Atata.TestApp");

            _coreRunProcess = new Process
            {
                StartInfo = UITestFixtureBase.IsOSLinux
                    ? new ProcessStartInfo
                {
                    FileName               = "/bin/bash",
                    Arguments              = "-c \"dotnet run\"",
                    WorkingDirectory       = testAppPath,
                    RedirectStandardOutput = true,
                    UseShellExecute        = false,
                    CreateNoWindow         = true
                }
                    : new ProcessStartInfo
                {
                    FileName         = "cmd.exe",
                    Arguments        = "/c dotnet run",
                    WorkingDirectory = testAppPath
                }
            };

            _coreRunProcess.Start();

            Thread.Sleep(5000);

            var testAppWait = new SafeWait <SetUpFixture>(this)
            {
                Timeout         = TimeSpan.FromSeconds(40),
                PollingInterval = TimeSpan.FromSeconds(1)
            };

            testAppWait.IgnoreExceptionTypes(typeof(WebException));

            testAppWait.Until(x => PingTestApp());
        }