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

Remove resources and add culture initialiser for test projects #103

Merged
merged 13 commits into from
Feb 24, 2019

Conversation

mdabros
Copy link
Owner

@mdabros mdabros commented Feb 24, 2019

This should fix issue #34, and fix the current issue with azure dev ops pipelines.

This adds an AssemblyInitializeCultureTest class for all unit test project, which sets the culture settings to CultureInfo.InvariantCulture. This should make the unit tests pass on machines with different culture settings.

    [TestClass]
    public class AssemblyInitializeCultureTest
    {
        [AssemblyInitialize]
        public static void AssemblyInitializeCultureTest_InvariantCulture(TestContext c)
        {
            CultureInfo culture = CultureInfo.InvariantCulture;
            CultureInfo.DefaultThreadCurrentCulture = culture;
            CultureInfo.DefaultThreadCurrentUICulture = culture;
            Thread.CurrentThread.CurrentCulture = culture;
            Thread.CurrentThread.CurrentUICulture = culture;
        }
    }

This pull request also removes the use of resources in all test projects, and instead uses a DataSetUtilities class to handle small test datasets. This also cleans up a lot of CsvParser code for loading the data.

@mdabros
Copy link
Owner Author

mdabros commented Feb 24, 2019

SharpLearning-CI-Build is the new CI build using the proper .net core pipeline in azure dev ops.

@mdabros mdabros merged commit d350dc4 into master Feb 24, 2019
@mdabros mdabros deleted the Add-culture-initializer-for-test-projects branch February 24, 2019 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant