コード例 #1
0
        public void GetValue_NameDoesNotMatch_ReturnsEmptyResult()
        {
            // Arrange
            var culture       = new CultureInfo("fr-FR");
            var valueProvider = new ElementalValueProvider("foo", "hi", culture);

            // Act
            var result = valueProvider.GetValue("bar");

            // Assert
            Assert.Equal(ValueProviderResult.None, result);
        }
コード例 #2
0
        public void GetValue_NameMatches_ReturnsValueProviderResult(string name)
        {
            // Arrange
            var culture       = new CultureInfo("fr-FR");
            var valueProvider = new ElementalValueProvider("foo", "hi", culture);

            // Act
            var result = valueProvider.GetValue(name);

            // Assert
            Assert.Equal("hi", (string)result);
            Assert.Equal(culture, result.Culture);
        }