public void When_KeyDefined_Then_ResourceShouldExist(string key, string cultureName) { // Arrange. var cultureInfo = CultureInfo.CreateSpecificCulture(cultureName); // Act. var value = StringResourceManager.GetPCodePhraseString(key, cultureInfo); // Assert. value.Should().NotBeNullOrWhiteSpace(because: $"PCode {key} is defined"); }
public string When_PartofCompositeKeyNotDefined_Then_ReturnNull(string key, string cultureName) { // Arrange. var cultureInfo = CultureInfo.CreateSpecificCulture(cultureName); // Act. var value = StringResourceManager.GetPCodePhraseString(key, cultureInfo); // Assert. value.Should().BeNull(); return(value); }
public string When_KeyIsComposite_Then_ReturnConcatenatedStrings(string key, string cultureName) { // Arrange. var cultureInfo = CultureInfo.CreateSpecificCulture(cultureName); // Act. var value = StringResourceManager.GetPCodePhraseString(key, cultureInfo); // Assert. value.Should().NotBeNullOrWhiteSpace(); return(value); }