コード例 #1
0
        public void IsEmptyTest()
        {
            string    tag      = "100";
            DataField target   = new DataField(tag);
            bool      expected = true;
            bool      actual   = target.IsEmpty();

            Assert.AreEqual(expected, actual);
            List <Subfield> subfields = new List <Subfield>();
            Subfield        subfield  = new Subfield('a', "It's a book!");

            subfields.Add(subfield);
            subfield = new Subfield('b', "Anne Author");
            subfields.Add(subfield);
            subfield = new Subfield('b', "Anne Otter Author");
            subfields.Add(subfield);
            target   = new DataField(tag, subfields);
            expected = false;
            actual   = target.IsEmpty();
            Assert.AreEqual(expected, actual);
        }