コード例 #1
0
        public void GetValue__Name_Null()
        {
            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            Assert.Throws <ArgumentNullException>(() => subs.GetValue((string)null));
        }
コード例 #2
0
        public void GetValue__Name_Null()
        {
            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            subs.GetValue((string)null);
        }
コード例 #3
0
        public void GetValue_Name_Empty()
        {
            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            subs.GetValue(string.Empty);
        }
コード例 #4
0
        public void GetValue_Name_ValueDoesNotExist()
        {
            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            string value1 = subs.GetValue("NAME");

            Assert.IsNull(
                value1,
                "A null value should have been returned.");
        }
コード例 #5
0
        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.");
        }
コード例 #6
0
        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.");
        }
コード例 #7
0
        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.");
        }
コード例 #8
0
        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.");
        }
コード例 #9
0
        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.");

        }
コード例 #10
0
        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.");

        }
コード例 #11
0
        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.");

        }
コード例 #12
0
        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.");

        }
コード例 #13
0
        public void GetValue_Name_ValueDoesNotExist()
        {

            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            string value1 = subs.GetValue("NAME");

            Assert.IsNull(
                value1,
                "A null value should have been returned.");

        }
コード例 #14
0
        public void GetValue__Name_Null()
        {

            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            subs.GetValue((string)null);

        }
コード例 #15
0
        public void GetValue_Name_Empty()
        {

            vCardSubpropertyCollection subs =
                new vCardSubpropertyCollection();

            subs.GetValue(string.Empty);

        }