Example #1
0
        public void GetIdElement_WhenElementNameMustBeNonColonizedAndItIsNotProvided_ThrowsArgumentNullException(string elementName)
        {
            var sut = new EncryptedXml();

            var ex = Assert.Throws <ArgumentNullException> (() => sut.GetIdElement(new XmlDocument(), elementName), "Exception");

            Assert.That(ex.ParamName, Is.EqualTo("name"), "ParamName");
        }
Example #2
0
        public void GetIdElement_WhenElementNameMustBeNonColonizedAndItContainsColon_ReturnsNull()
        {
            var sut = new EncryptedXml();

            Assert.That(sut.GetIdElement(new XmlDocument(), "t:test"), Is.Null);
        }
Example #3
0
        public void GetIdElement_StringNull()
        {
            EncryptedXml ex = new EncryptedXml();

            Assert.Throws <ArgumentNullException>(() => ex.GetIdElement(new XmlDocument(), null));
        }
Example #4
0
        public void GetIdElement_XmlDocumentNull()
        {
            EncryptedXml ex = new EncryptedXml();

            Assert.IsNull(ex.GetIdElement(null, "value"));
        }
Example #5
0
        public void GetIdElement_StringNull()
        {
            EncryptedXml ex = new EncryptedXml();

            Assert.IsNull(ex.GetIdElement(new XmlDocument(), null));
        }