public void GetValue__Name_Null() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); Assert.Throws <ArgumentNullException>(() => subs.GetValue((string)null)); }
public void GetValue__Name_Null() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); subs.GetValue((string)null); }
public void GetValue_Name_Empty() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); subs.GetValue(string.Empty); }
public void GetValue_Name_ValueDoesNotExist() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); string value1 = subs.GetValue("NAME"); Assert.IsNull( value1, "A null value should have been returned."); }
public void GetValue_Name_ValueExists() { vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); subs.Add("NAME", "VALUE"); string value = subs.GetValue("NAME"); Assert.AreEqual( "VALUE", value, "The value should have been returned."); }
public void GetValue_ValueList_NameDoesNotExist_NullList() { // The GetValue function should work even if // the potential value list is null. vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); string value = subs.GetValue("NAME", (string[])null); Assert.IsNull( value, "The value should be null."); }
public void GetValue_ValueList_NameExists_NullList() { // The GetValue function should work even if // the potential value list is null. vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); subs.Add("NAME", "VALUE"); string value = subs.GetValue("NAME", (string[])null); Assert.AreEqual( "VALUE", value, "The value should have been returned despite the null list."); }
public void GetValue_ValueList_NameDoesNotExist_ListValueExists() { // The GetValue function should work even if // the potential value list is null. vCardSubpropertyCollection subs = new vCardSubpropertyCollection(); subs.Add("VALUE"); string value = subs.GetValue("NAME", new string[] { "ABC", "VALUE" }); Assert.AreEqual( "VALUE", value, "The value should have been returned."); }