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); }
public void CorrectPathShouldSucceed() { const int expectedCount = 0; const string expectedKey = "version"; var result = ZapClient.CallApi("core", ActionTypes.View, "version"); SingleResultAsserts(result, expectedCount, expectedKey); }
public void InvalidActionShouldThrowException() { const string expectedExceptionMessage = " (400) "; var webException = Assert.Throws <WebException>(() => ZapClient.CallApi("core", ActionTypes.View, "test")); StringAssert.Contains(expectedExceptionMessage, webException.Message); }
public void InvalidComponendAndTypeShouldThrowException() { const string expectedExceptionMessage = " (400) "; var webException = Assert.Throws <WebException>(() => ZapClient.CallApi("test", "test", "version")); StringAssert.Contains(expectedExceptionMessage, webException.Message); }