GetString() 공개 메소드

Gets the string from the specified resource file with the current culture.
The is null. The is null. The is null.
public GetString ( ILanguageSource languageSource, string resourceName, CultureInfo cultureInfo ) : string
languageSource ILanguageSource The language source.
resourceName string Name of the resource.
cultureInfo System.Globalization.CultureInfo The culture information.
리턴 string
예제 #1
0
            public void ReturnsStringForMvvmAssembly()
            {
                var languageService = new LanguageService();

                Assert.AreEqual("Warning", languageService.GetString("WarningTitle"));
                Assert.AreEqual("Warning", languageService.GetString("WarningTitle"));
            }
예제 #2
0
            public void ReturnsNullForNonExistingResource()
            {
                var languageService = new LanguageService();

                Assert.AreEqual(null, languageService.GetString("NonExistingResourceName"));
            }
예제 #3
0
            public void ThrowsArgumentExceptionForNullResourceName()
            {
                var languageService = new LanguageService();

                ExceptionTester.CallMethodAndExpectException<ArgumentException>(() => languageService.GetString(null));
            }
예제 #4
0
            public void ReturnsStringForCoreAssembly()
            {
                var languageService = new LanguageService();

                Assert.AreEqual("{0} has the following warnings:", languageService.GetString("WarningsFound"));
            }