Skip to content

Commit

Permalink
made change to test added 4 spaces instead of tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Kethireddy authored and Kethireddy committed Sep 27, 2016
1 parent 32b99d6 commit 3416328
Showing 1 changed file with 47 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,52 +53,52 @@
*/
public class EventSubmissionBeforeAssignmentTest extends TestBase{

static final Logger LOGGER = LoggerFactory.getLogger(EventSubmissionBeforeAssignmentTest.class);
Experiment experiment;

@BeforeClass
public void testSetUp()
{
//create an experiment and populate the experiment POJO
experiment = ExperimentFactory.createExperiment();
DefaultNameExclusionStrategy experimentComparisonStrategy = new DefaultNameExclusionStrategy("creationTime", "modificationTime", "ruleJson");
experiment.setSerializationStrategy(experimentComparisonStrategy);
Experiment exp = postExperiment(experiment);
Assert.assertNotNull(exp.creationTime, "Experiment creation failed (No creationTime).");
Assert.assertNotNull(exp.modificationTime, "Experiment creation failed (No modificationTime).");
Assert.assertNotNull(exp.state, "Experiment creation failed (No state).");
experiment.update(exp);

//create buckets within the experiment
List<Bucket> buckets = postBuckets(BucketFactory.createCompleteBuckets(experiment, 2));
Assert.assertEquals(buckets.size(), 2);

//change the state of the experiment from DRAFT to RUNNING
experiment.state = Constants.EXPERIMENT_STATE_RUNNING;
exp = putExperiment(experiment);
assertEqualModelItems(exp, experiment);

}


@Test()
public void createImpression()
{
//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_BAD_REQUEST);
}


@AfterClass
public void testCleanUp(){
experiment.state = Constants.EXPERIMENT_STATE_TERMINATED;
Experiment exp = putExperiment(experiment);
experiment.update(exp);
deleteExperiment(experiment);
}
static final Logger LOGGER = LoggerFactory.getLogger(EventSubmissionBeforeAssignmentTest.class);
Experiment experiment;

@BeforeClass
public void testSetUp()
{
//create an experiment and populate the experiment POJO
experiment = ExperimentFactory.createExperiment();
DefaultNameExclusionStrategy experimentComparisonStrategy = new DefaultNameExclusionStrategy("creationTime", "modificationTime", "ruleJson");
experiment.setSerializationStrategy(experimentComparisonStrategy);
Experiment exp = postExperiment(experiment);
Assert.assertNotNull(exp.creationTime, "Experiment creation failed (No creationTime).");
Assert.assertNotNull(exp.modificationTime, "Experiment creation failed (No modificationTime).");
Assert.assertNotNull(exp.state, "Experiment creation failed (No state).");
experiment.update(exp);

//create buckets within the experiment
List<Bucket> buckets = postBuckets(BucketFactory.createCompleteBuckets(experiment, 2));
Assert.assertEquals(buckets.size(), 2);

//change the state of the experiment from DRAFT to RUNNING
experiment.state = Constants.EXPERIMENT_STATE_RUNNING;
exp = putExperiment(experiment);
assertEqualModelItems(exp, experiment);

}


@Test()
public void createImpression()
{
//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_BAD_REQUEST);
}


@AfterClass
public void testCleanUp(){
experiment.state = Constants.EXPERIMENT_STATE_TERMINATED;
Experiment exp = putExperiment(experiment);
experiment.update(exp);
deleteExperiment(experiment);
}

}

0 comments on commit 3416328

Please sign in to comment.