public void DoesNotIncludeEmptyList() { var model = new ClassWithStringCollection { Strings = new List <string>() }; var result = model.ToParametersDictionary(); Assert.Equal(0, result.Count); }
public void JoinsStringCollectionIntoCommaSeparatedString() { var model = new ClassWithStringCollection { Strings = new List <string> { "one", "two" } }; var result = model.ToParametersDictionary(); Assert.Equal(1, result.Count); Assert.Equal("one,two", result["strings"]); }
public void StringCollection() { var target = new ClassWithStringCollection { Property = new List <string> { "Value1", "Value2" } }; var result = RoundTrip.Run(target); Assert.Equal("Value2", result.Property.Last()); }
public void JoinsStringCollectionIntoCommaSeparatedString() { var model = new ClassWithStringCollection { Strings = new List<string> { "one", "two" } }; var result = model.ToParametersDictionary(); Assert.Equal(1, result.Count); Assert.Equal("one,two", result["strings"]); }
public void DoesNotIncludeEmptyList() { var model = new ClassWithStringCollection { Strings = new List<string>() }; var result = model.ToParametersDictionary(); Assert.Equal(0, result.Count); }