Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore DB specific tests which rely on PostgreSQL #31

Open
Almantask opened this issue May 31, 2019 · 0 comments
Open

Ignore DB specific tests which rely on PostgreSQL #31

Almantask opened this issue May 31, 2019 · 0 comments
Labels
database Database design related test

Comments

@Almantask
Copy link
Member

Almantask commented May 31, 2019

public class IgnoreOnMonoFactAttribute : FactAttribute {

    public IgnoreOnMonoFactAttribute() {
        if(IsRunningOnMono()) {
            Skip = "Ignored on Mono";
        }
    }
    /// <summary>
    /// Determine if runtime is Mono.
    /// Taken from http://stackoverflow.com/questions/721161
    /// </summary>
    /// <returns>True if being executed in Mono, false otherwise.</returns>
    public static bool IsRunningOnMono() {
        return Type.GetType("Mono.Runtime") != null;
    }
}
@Almantask Almantask added database Database design related test labels May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Database design related test
Projects
None yet
Development

No branches or pull requests

1 participant