예제 #1
0
            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");
            }
예제 #2
0
            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);
            }
예제 #3
0
            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);
            }