Example #1
0
        public void ExecuteRawJavaScript_NullOrEmptyScript_ThrowsArgumentNullException(
            [Values(null, "")] string script)
        {
            Action action = () => Taconite.Execute(script);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #2
0
        public void ExecutePlugin_NullOrEmptyPluginName_ThrowsArgumentNullException(
            [Values(null, "")] string pluginName)
        {
            Action action = () => Taconite.ExecutePlugin(pluginName);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #3
0
        public void RemoveAttributeFromElement_NullOrEmptyAttributeName_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.RemoveAttribute(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void AddClassToElement_NullOrEmptyClassName_ThrowsArgumentNullException(
            [Values(null, "")] string className)
        {
            Action action = () => Taconite.AddClass(className);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #5
0
        public void RemoveElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.Remove(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void PrependPartialViewToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.PrependPartialView().To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void InsertPartialViewBeforeElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.InsertPartialView().Before(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #8
0
        public void SlideUpElement_NullOrEmptySelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            Action action = () => Taconite.SlideUp(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #9
0
        public void SetAttributeForElement_NullAttributeValue_ThrowsArgumentNullException()
        {
            var attributeName = "attribute";

            Action action = () => Taconite.SetAttribute(attributeName, null);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #10
0
        public void SetAttributesForElement_ObjectHasTwoPropertiesWithSameNamesButDifferentCase_ThrowsArgumentException()
        {
            var attributes = new { ATTRIBUTE = 123, attribute = "value" };

            Action action = () => Taconite.SetAttributes(attributes);

            action.ShouldThrow <ArgumentException>();
        }
        public void ReplaceContentsOfElementsWithRawHtmlContent_NullHtmlContent_ThrowsArgumentNullException()
        {
            var selector = "#selector";

            Action action = () => Taconite.ReplaceContentsOf(selector).WithContent((string)null);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void ReplaceContentsOfElementsWithPartialViewResultContent_NullPartialViewResult_ThrowsArgumentNullException()
        {
            var selector = "#selector";

            Action action = () => Taconite.ReplaceContentsOf(selector).WithContent((PartialViewResult)null);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void AddClassesToElement_NoClassNames_ThrowsArgumentNullException()
        {
            var selector = "#selector";

            Action action = () => Taconite.AddClasses().To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void PrependRawHtmlContentToElement_NullHtmlContent_ThrowsArgumentNullException()
        {
            var selector = "#selector";

            Action action = () => Taconite.PrependContent((string)null).To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void PrependPartialViewResultContentToElement_NullPartialViewResult_ThrowsArgumentNullException()
        {
            var selector = "#selector";

            Action action = () => Taconite.PrependContent((PartialViewResult)null).To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void RemoveClassesFromElement_NoClasses_ThrowsArgumentNullException()
        {
            var selector = "#selector";

            Action action = () => Taconite.RemoveClasses().From(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #17
0
        public void SetAttributesForElement_ObjectHasNoProperties_ThrowsArgumentException()
        {
            var attributes = new {};

            Action action = () => Taconite.SetAttributes(attributes);

            action.ShouldThrow <ArgumentException>();
        }
        public void PrependRawHtmlContentToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var html = "<div>Some HTML!</div>";

            Action action = () => Taconite.PrependContent(html).To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #19
0
        public void SetAttributeForElement_NullOrEmptyAttributeName_ThrowsArgumentNullException(
            [Values(null, "")] string attributeName)
        {
            var attributeValue = 123;

            Action action = () => Taconite.SetAttribute(attributeName, attributeValue);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #20
0
        public void RemoveAttributesFromElement_NullOrEmptyAttribute_ThrowsArgumentNullException(
            [Values(null, "")] string attribute)
        {
            var selector = "#selector";

            Action action = () => Taconite.RemoveAttributes(attribute).From(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void AddClassToElement_NullOrEmptySelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var className = "class";

            Action action = () => Taconite.AddClass(className).To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #22
0
        public void RemoveAttributeFromElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var attributeName = "attribute";

            Action action = () => Taconite.RemoveAttribute(attributeName).From(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void InsertRawHtmlContentBeforeElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var html = "<div>Some HTML!</div>";

            Action action = () => Taconite.InsertContent(html).Before(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void RemoveClassFromElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var className = "class";

            Action action = () => Taconite.RemoveClass(className).From(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void RemoveClassesFromElement_NullOrEmptyClass_ThrowsArgumentNullException(
            [Values(null, "")] string className)
        {
            var selector = "#selector";

            Action action = () => Taconite.RemoveClasses(className).From(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #26
0
        public void ExecutePluginWithPartialViewResult_NullPartialViewResult_ThrowsArgumentNullException()
        {
            var plugin   = "plugin";
            var selector = "#selector";

            Action action = () => Taconite.ExecutePlugin(plugin).For(selector).WithContent((PartialViewResult)null);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #27
0
        public void ExecutePlugin_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var plugin = "plugin";

            Action action = () => Taconite.ExecutePlugin(plugin).For(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
Example #28
0
        public void ExecutePluginWithRawHtmlContent_NullHtmlContent_ThrowsArgumentNullException()
        {
            var plugin   = "plugin";
            var selector = "#selector";

            Action action = () => Taconite.ExecutePlugin(plugin).For(selector).WithContent((string)null);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void PrependPartialViewResultContentToElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var partialViewResult = new PartialViewResult();

            Action action = () => Taconite.PrependContent(partialViewResult).To(selector);

            action.ShouldThrow <ArgumentNullException>();
        }
        public void InsertPartialViewResultContentBeforeElement_NullOrEmptyTargetSelector_ThrowsArgumentNullException(
            [Values(null, "")] string selector)
        {
            var partialViewResult = new PartialViewResult();

            Action action = () => Taconite.InsertContent(partialViewResult).Before(selector);

            action.ShouldThrow <ArgumentNullException>();
        }