fluentsharp / FluentSharp

Fluent API for the .NET Framework (used by the O2 Platform)
63 stars 18 forks source link

Fix fluentsharp test that is failing at appveyor #57

Open DinisCruz opened 9 years ago

DinisCruz commented 9 years ago

https://ci.appveyor.com/project/DinisCruz/fluentsharp

image

https://ci.appveyor.com/project/DinisCruz/fluentsharp/build/tests

image

DinisCruz commented 9 years ago

it's a different one now

image

this one is caused by the fact that the tests are running without a desktop

alexandrustanimir commented 9 years ago

I was unable to find a method to check for this kind of execution context where you don`t have desktop :(. As a workaround we can ignore the test if we find an environment variable specific to appveyor.

var envs = Environment.GetEnvironmentVariables().toList(); foreach (var item in envs) { if (item.Value.ToString().contains("appveyor")) { "Appveyor is running in terminal mode.(Skipping)".assert_Ignore(); return; } } What do you think ?

DinisCruz commented 9 years ago

yeah, with the caveat that we should be using an extension method like

if ("appveyor".environment_Variable().valid())
    ...

:)

Btw, have you pinged Appveyor and asked about tests that require desktop? They really should have a solution for that, or no UI QA tests will be able to be executed there