Esempio n. 1
0
        public void EmployeeCreationReturnsOkStatusCode()
        {
            var response = _sut.CreateEntityAndGetAStatusCode(_client, ExpectedEmployeeName + _sut.EntityCode);

            Assert.That(response, Is.EqualTo(HttpStatusCode.OK),
                        "Employee creation did not result in the 'Ok' status code, but should have.");
        }
Esempio n. 2
0
        public void EmployeeCreationWithInvalidAccessTokenIsNotAllowed()
        {
            _sut = new RESTHelper(false);
            var response = _sut.CreateEntityAndGetAStatusCode(_client, ExpectedEmployeeName + _sut.EntityCode);

            Assert.That(response, Is.EqualTo(HttpStatusCode.Unauthorized),
                        "Employee creation with the invalid token was allowed, but should not have been.");
        }