예제 #1
0
        public async Task given_invalid_password_to_loginEndpoint_should_return_401()
        {
            var payload = LoginDataBuilder.Generate_Invalid_Password_LoginCommand();

            //act
            var response = await Client.PostAsync("security/login", payload);

            //assert
            response.StatusCode.Should().Be(HttpStatusCode.Unauthorized);
        }
예제 #2
0
        public async Task given_correct_loginAndPassword_to_loginEndpoint_should_return_200()
        {
            var payload = LoginDataBuilder.Generate_Correct_LoginAndPassword_LoginCommand();

            //act
            var response = await Client.PostAsync("security/login", payload);

            //assert
            response.StatusCode.Should().Be(HttpStatusCode.OK);
        }