public void MakeDictionary_returns_keyvalue_paired(string valuesSeparated) { //arrange string[] values = valuesSeparated.Split(','); //act var actual = CPUtil.MakeDictionary(values); //assert actual.ShouldAllBeEquivalentTo(values.Select(val => new KeyValuePair <string, string>(val, val))); }
public void MakeDictionary_no_args_returns_empty() { //arrange string[] values = null; //act var actual = CPUtil.MakeDictionary(values); //assert actual.Should().NotBeNull(); actual.Should().BeEmpty(); }
public void MakeDictionary_duplicate_values_throws() { //arrange string[] values = { "There", "There" }; //act Assert.Throws <ArgumentException>(() => { CPUtil.MakeDictionary(values); }); //assert }