Skip to content

Commit

Permalink
adding test cases based on context
Browse files Browse the repository at this point in the history
Change-Id: I14a9037f023a00ed97d3343970eb52c964abf522
  • Loading branch information
sudheerkethireddy committed Oct 13, 2016
1 parent 77d7e79 commit 822b59c
Showing 1 changed file with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,52 @@ public void testSetUp() {


@Test
public void createImpression() {
public void createDefaultImpression() {
//create user
User user = UserFactory.createUser();

//create an event of type IMPRESSION and post it to the event endpoint
Event impression = EventFactory.createImpression();
postEvent(impression, experiment, user, HttpStatus.SC_NOT_FOUND);
}


@Test
public void createImpressionWithContextSetForProd() {
//create user
User user = UserFactory.createUser();

//create an event of type IMPRESSION and post it to the event endpoint
Event impression = EventFactory.createImpression();
impression.context="prod";
postEvent(impression, experiment, user, HttpStatus.SC_NOT_FOUND);
}

@Test
public void createImpressionWithContextSetForQA() {
//create user
User user = UserFactory.createUser();


//create an event of type IMPRESSION and post it to the event endpoint
Event impression = EventFactory.createImpression();
impression.context="QA";
postEvent(impression, experiment, user, HttpStatus.SC_NOT_FOUND);
}


@Test
public void createImpressionWithContextSetForBothQAAndProd() {
//create user
User user = UserFactory.createUser();

//create an event of type IMPRESSION and post it to the event endpoint
Event impression = EventFactory.createImpression();
impression.context="QA";
postEvent(impression, experiment, user, HttpStatus.SC_NOT_FOUND);
impression.context ="PROD";
postEvent(impression, experiment, user, HttpStatus.SC_CREATED);
}

@AfterClass
public void testCleanUp() {
Expand Down

0 comments on commit 822b59c

Please sign in to comment.