Example #1
0
        public void EmptyParameterDictShouldSucceed()
        {
            const int    expectedCount = 0;
            const string expectedKey   = "version";
            var          result        = ZapClient.CallApi("core", ActionTypes.View, "version", new Dictionary <string, string>());

            SingleResultAsserts(result, expectedCount, expectedKey);
        }
Example #2
0
        public void CorrectPathShouldSucceed()
        {
            const int    expectedCount = 0;
            const string expectedKey   = "version";
            var          result        = ZapClient.CallApi("core", ActionTypes.View, "version");

            SingleResultAsserts(result, expectedCount, expectedKey);
        }
Example #3
0
        public void InvalidActionShouldThrowException()
        {
            const string expectedExceptionMessage = " (400) ";
            var          webException             = Assert.Throws <WebException>(() => ZapClient.CallApi("core", ActionTypes.View, "test"));

            StringAssert.Contains(expectedExceptionMessage, webException.Message);
        }
Example #4
0
        public void InvalidComponendAndTypeShouldThrowException()
        {
            const string expectedExceptionMessage = " (400) ";
            var          webException             = Assert.Throws <WebException>(() => ZapClient.CallApi("test", "test", "version"));

            StringAssert.Contains(expectedExceptionMessage, webException.Message);
        }