Search in sources :

Example 46 with User

use of com.sanctionco.thunder.models.User in project thunder by RohanNagar.

the class ThunderClientTest method testResetVerificationStatus.

@Test
void testResetVerificationStatus() throws Exception {
    User response = client.resetVerificationStatus("email", "password").get();
    assertEquals(user.getEmail(), response.getEmail());
}
Also used : User(com.sanctionco.thunder.models.User) Test(org.junit.jupiter.api.Test)

Example 47 with User

use of com.sanctionco.thunder.models.User in project thunder by RohanNagar.

the class ThunderClientTest method testGetUser.

@Test
void testGetUser() throws Exception {
    User response = client.getUser("email", password).get();
    assertEquals(user.getEmail(), response.getEmail());
}
Also used : User(com.sanctionco.thunder.models.User) Test(org.junit.jupiter.api.Test)

Example 48 with User

use of com.sanctionco.thunder.models.User in project thunder by RohanNagar.

the class ThunderClientTest method testVerifyUser.

@Test
void testVerifyUser() throws Exception {
    User response = client.verifyUser("email", "token").get();
    assertEquals(user.getEmail(), response.getEmail());
}
Also used : User(com.sanctionco.thunder.models.User) Test(org.junit.jupiter.api.Test)

Example 49 with User

use of com.sanctionco.thunder.models.User in project thunder by RohanNagar.

the class ThunderClientTest method testDeleteUser.

@Test
void testDeleteUser() throws Exception {
    User response = client.deleteUser("email", password).get();
    assertEquals(user.getEmail(), response.getEmail());
}
Also used : User(com.sanctionco.thunder.models.User) Test(org.junit.jupiter.api.Test)

Example 50 with User

use of com.sanctionco.thunder.models.User in project thunder by RohanNagar.

the class ThunderClientTest method testPostUser.

@Test
void testPostUser() throws Exception {
    User response = client.postUser(user).get();
    assertEquals(user.getEmail(), response.getEmail());
}
Also used : User(com.sanctionco.thunder.models.User) Test(org.junit.jupiter.api.Test)

Aggregations

User (com.sanctionco.thunder.models.User)51 Test (org.junit.jupiter.api.Test)41 Email (com.sanctionco.thunder.models.Email)26 RequestValidator (com.sanctionco.thunder.validation.RequestValidator)11 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)11 UsersDao (com.sanctionco.thunder.dao.UsersDao)8 Objects (java.util.Objects)8 Logger (org.slf4j.Logger)8 LoggerFactory (org.slf4j.LoggerFactory)8 UUID (java.util.UUID)7 BsonDocument (org.bson.BsonDocument)6 Document (org.bson.Document)6 Metered (com.codahale.metrics.annotation.Metered)5 Counter (com.codahale.metrics.Counter)4 MetricRegistry (com.codahale.metrics.MetricRegistry)4 ThunderException (com.sanctionco.thunder.ThunderException)4 SwaggerAnnotations (com.sanctionco.thunder.openapi.SwaggerAnnotations)4 MetricNameUtil (com.sanctionco.thunder.util.MetricNameUtil)4 RequestValidationException (com.sanctionco.thunder.validation.RequestValidationException)4 POST (javax.ws.rs.POST)4