public void ShouldHaveNullResultWhenConverting() { GivenDataDictionary = new Dictionary <string, object> { { "Name", "Jane Doe" } }; WhenConverting(); ThenResult.Should().BeNull(); ThenSuccess.Should().BeFalse(); }
public void ShouldHaveNullResultWhenConvertingGivenNoValidConverters() { GivenDataDictionary = new Dictionary <string, object> { { "Name", "Jane Doe" } }; GivenConversionTo = typeof(string); WhenConverting(); ThenResult.Should().BeNull(); ThenSuccess.Should().BeFalse(); }
public void ShouldHaveValidResultWhenConvertingToAKnownConverterType() { GivenDataDictionary = new Dictionary <string, object> { { "Name", "Jane Doe" } }; GivenConversionTo = typeof(string); GivenConverter = dct => string.Join(", ", dct.Keys.Select(key => key + "=" + dct[key])); WhenConverting(); ThenSuccess.Should().BeTrue(); ThenResult.Should().BeAssignableTo <string>(); ThenResult.Should().NotBeNull().And.Be("Name=Jane Doe"); }