Example #1
0
        public void CheckNotAutorizedStatusCodeGetAllCollection()
        {
            _collections = new GetCollectionsActions(InCorrectApiKey);
            var actualStatusCode = _collections.GetCollectionResponse().StatusCode;
            const HttpStatusCode expectedStatusCode = HttpStatusCode.Unauthorized;

            Assert.AreEqual(actualStatusCode, expectedStatusCode, $"Actual status code{actualStatusCode} is not equal to expected {expectedStatusCode}");
        }
Example #2
0
        public void CheckCorrectStatusCodeGetCollection()
        {
            var collectionId = new GetCollectionsActions(CorrectApiKey).GetAllCollentions().Collections.First().Id;

            _collection = new GetCollectionActions(CorrectApiKey, collectionId);
            var actualStatusCode = _collection.GetCollectionResponse().StatusCode;
            const HttpStatusCode expectedStatusCode = HttpStatusCode.OK;

            Assert.AreEqual(expectedStatusCode, actualStatusCode, $"Actual status code{actualStatusCode} is not equal to expected {expectedStatusCode}");
        }