1 instantiation of CustomResourceManager
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\DiagnosticLocalizationTests.cs (1)
152
return new
CustomResourceManager
(resourceSetMap);
25 references to CustomResourceManager
Microsoft.CodeAnalysis.UnitTests (25)
Diagnostics\DiagnosticLocalizationTests.cs (25)
24
var
resourceManager = GetTestResourceManagerInstance();
26
var defaultCultureResourceSet = resourceManager.GetResourceSet(
CustomResourceManager
.DefaultCulture, false, false);
58
var localizableTitle = new LocalizableResourceString(nameOfResource1, resourceManager, typeof(
CustomResourceManager
));
59
var localizableMessageFormat = new LocalizableResourceString(nameOfResource2, resourceManager, typeof(
CustomResourceManager
));
60
var localizableDescription = new LocalizableResourceString(nameOfResource3, resourceManager, typeof(
CustomResourceManager
));
78
Assert.Equal<string>(fixedTitle, descriptor.Title.ToString(
CustomResourceManager
.DefaultCulture));
79
Assert.Equal<string>(fixedMessageFormat, descriptor.MessageFormat.ToString(
CustomResourceManager
.DefaultCulture));
80
Assert.Equal<string>(fixedDescription, descriptor.Description.ToString(
CustomResourceManager
.DefaultCulture));
97
Assert.Equal(fixedTitle, localizableDiagnostic.Descriptor.Title.ToString(
CustomResourceManager
.DefaultCulture));
98
Assert.Equal(fixedMessageFormat, localizableDiagnostic.GetMessage(
CustomResourceManager
.DefaultCulture));
99
Assert.Equal(fixedDescription, localizableDiagnostic.Descriptor.Description.ToString(
CustomResourceManager
.DefaultCulture));
109
var localizableResource = new LocalizableResourceString(nameOfResourceWithArguments, resourceManager, typeof(
CustomResourceManager
), argument);
120
Assert.Equal(expected, localizableResource.ToString(
CustomResourceManager
.DefaultCulture));
128
private static
CustomResourceManager
GetTestResourceManagerInstance()
148
{
CustomResourceManager
.DefaultCulture.Name, defaultCultureResources },
241
var
resourceManager = GetTestResourceManagerInstance();
243
.Create(new LocalizableResourceString(@"ResourceWithArguments", resourceManager, typeof(
CustomResourceManager
), "arg"))
245
new LocalizableResourceString(@"ResourceWithArguments", resourceManager, typeof(
CustomResourceManager
), "arg"))
247
new LocalizableResourceString(@"ResourceWithArguments", resourceManager, typeof(
CustomResourceManager
), "otherarg"),
248
new LocalizableResourceString(@"Resource1", resourceManager, typeof(
CustomResourceManager
)));
251
var str = new LocalizableResourceString(@"ResourceWithArguments", resourceManager, typeof(
CustomResourceManager
), "arg");
331
var
resourceManager = GetTestResourceManagerInstance();
334
var localizableTitle = new LocalizableResourceString("NonExistentTitleResourceName", resourceManager, typeof(
CustomResourceManager
));
335
var localizableMessage = new LocalizableResourceString("NonExistentMessageResourceName", resourceManager, typeof(
CustomResourceManager
));
336
var localizableDescription = new LocalizableResourceString("NonExistentDescriptionResourceName", resourceManager, typeof(
CustomResourceManager
));