-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christian Soltenborn
committed
Dec 10, 2018
1 parent
2095af6
commit c54794d
Showing
1 changed file
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. | ||
|
||
using System; | ||
using System.IO; | ||
using System.Reflection; | ||
|
||
namespace GoogleTestAdapter.Common | ||
{ | ||
public class Strings | ||
{ | ||
private static IStrings _strings; | ||
public class Strings : IStrings | ||
{ | ||
private static readonly IStrings _strings; | ||
|
||
static Strings() | ||
{ | ||
_strings = new Strings(); | ||
|
||
// this is broken since 0.14.0 for reasons I don't understand. Switching to fixed GTA strings for now... | ||
// var path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "GoogleTestAdapter.Common.Dynamic.dll"); | ||
// var asm = Assembly.LoadFile(path); | ||
// var type = asm.GetType("GoogleTestAdapter.Common.Strings"); | ||
// _strings = (IStrings)Activator.CreateInstance(type); | ||
} | ||
|
||
public static IStrings Instance => _strings; | ||
|
||
static Strings() | ||
{ | ||
var path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "GoogleTestAdapter.Common.Dynamic.dll"); | ||
var asm = Assembly.LoadFile(path); | ||
var type = asm.GetType("GoogleTestAdapter.Common.Strings"); | ||
_strings = (IStrings)Activator.CreateInstance(type); | ||
} | ||
public string ExtensionName => "Google Test Adapter"; | ||
public string TroubleShootingLink => "Check out Google Test Adapter's trouble shooting section at https://github.com/csoltenborn/GoogleTestAdapter#trouble_shooting"; | ||
public string TestDiscoveryStarting => "Google Test Adapter: Test discovery starting..."; | ||
public string TestExecutionStarting => "Google Test Adapter: Test execution starting..."; | ||
|
||
public static IStrings Instance => _strings; | ||
} | ||
} | ||
} | ||
} |