public void TryGetTextForNonExistingValueReturnsFalse() { var textProvider = new MvxResxTextProvider(_resourceManager); string actual; Assert.False(textProvider.TryGetText(out actual, null, null, "NonExistingKey")); Assert.Null(actual); }
public void TryGetTextSupplyingTypeKeyAndNameOutputsValueMatchingTypeKeyAndName() { var textProvider = new MvxResxTextProvider(_resourceManager); var expected = $"{MockResourceManager.TypeKey}.{MockResourceManager.DummyName}"; string actual; Assert.True(textProvider.TryGetText(out actual, null, MockResourceManager.TypeKey, MockResourceManager.DummyName)); Assert.Equal(expected, actual); }
public void TryGetTextForExistingValueSupplyingNameOnlyReturnsTrue() { var textProvider = new MvxResxTextProvider(_resourceManager); var expected = MockResourceManager.DummyName; string actual; Assert.True(textProvider.TryGetText(out actual, null, null, MockResourceManager.DummyName)); Assert.Equal(expected, actual); }
public void TryGetTextSupplyingNamespaceAndNameOutputsValueMatchingNamespaceAndName() { var textProvider = new MvxResxTextProvider(_resourceManager); var expected = $"{MockResourceManager.LocalizationNamespace}.{MockResourceManager.DummyName}"; string actual; Assert.IsTrue(textProvider.TryGetText(out actual, MockResourceManager.LocalizationNamespace, null, MockResourceManager.DummyName)); Assert.AreEqual(expected, actual); }