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());
        }
 public void SetUp()
 {
     wait = new SafeWait <object>(new object())
     {
         Timeout         = TimeSpan.FromSeconds(.3),
         PollingInterval = TimeSpan.FromSeconds(.05)
     };
 }
Пример #3
0
        public static void ShouldContain(string fileName, double secondsToWait = 15d)
        {
            AtataContext.Current.Log.ExecuteSection(
                new LogSection($@"Assert: ""{fileName}"" file exists"),
                () =>
            {
                string filePath = Path.Combine(DirectoryPath, fileName);

                bool exists = new SafeWait <string>(filePath)
                {
                    Timeout = TimeSpan.FromSeconds(secondsToWait)
                }.Until(File.Exists);

                Assert.That(exists, Is.True, $@"""{fileName}"" file should be downloaded.");
            });
        }
Пример #4
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());
        }