public void ParseErrorMessageWithoutCode()
        {
            const string message = "::No clientID";
            BayeuxError error = new BayeuxError(message);

            Assert.IsTrue(false, "Exception should be thrown already!");
        }
        public void ParseErrorWithoutMessage()
        {
            const string message = "";
            BayeuxError error = new BayeuxError("101::" + message);

            Assert.AreEqual(error.Message, message, "Invalid message");
            Assert.IsNotNull(error.Arguments, "Argumets should not be null");
            Assert.AreEqual(error.Arguments.Count, 0, "Invalid number or message arguments");
            Assert.AreEqual(error.Code, 101, "Invalid error code");
        }
        public void ParseErrorMessageOnly()
        {
            const string message = "This is message only";
            BayeuxError error = new BayeuxError(message);

            Assert.AreEqual(error.Message, message, "Invalid message");
            Assert.IsNotNull(error.Arguments, "Argumets should not be null");
            Assert.AreEqual(error.Arguments.Count, 0, "Invalid number or message arguments");
            Assert.AreEqual(error.Code, 0, "Invalid error code");
        }
        public void ParseErrorWithArgs()
        {
            const string message = "No Message";
            const string argument = "/foo/bar";
            BayeuxError error = new BayeuxError("101:" + argument + ":" + message);

            Assert.AreEqual(error.Message, message, "Invalid message");
            Assert.IsNotNull(error.Arguments, "Argumets should not be null");
            Assert.AreEqual(error.Arguments.Count, 1, "Invalid number or message arguments");
            Assert.AreEqual(error.Arguments[0], argument, "Invalid argument");
            Assert.AreEqual(error.Code, 101, "Invalid error code");
        }