public void ShouldGetDefaultLocalStringsBecauseLanguageNotFound()
        {
            // Arrange
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var localStrings = localController.GetLocalStringsOrDefault <TestLocalStrings>("fr");

            // Assert
            Assert.AreEqual("TestString1", localStrings.TestString1);
        }
        public void ShouldGetDELocalStrings()
        {
            // Arrange
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var localStrings = localController.GetLocalStringsOrDefault <TestLocalStrings>("de");

            // Assert
            Assert.AreEqual("TestString1DE", localStrings.TestString1);
        }
Esempio n. 3
0
        public void ShouldGetDELocalStrings()
        {
            // Arrange
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var localStrings = localController.GetLocalStringsOrDefault<TestLocalStrings>("de");

            // Assert
            Assert.AreEqual("TestString1DE", localStrings.TestString1);
        }
Esempio n. 4
0
        public void ShouldGetDefaultLocalStringsBecauseLanguageNotFound()
        {
            // Arrange
            var localController = new LocalController(new ILocalStrings[] { new TestLocalStrings() });

            // Act
            var localStrings = localController.GetLocalStringsOrDefault<TestLocalStrings>("fr");

            // Assert
            Assert.AreEqual("TestString1", localStrings.TestString1);
        }