Campaign { public boolean shouldTrackUserAutomatically() { return trackUserAutomatically; } Campaign(VWO vwo, JSONObject campaignData); long getId(); String getName(); int getVersion(); CampaignTypeEnum getType(); ArrayList<Goal> getGoals(); Variation getVariation(); boolean shouldTrackUserAutomatically(); ArrayList<Segment> getSegments(); String getSegmentType(); String getTestKey(); @Override boolean equals(Object obj); @Override int hashCode(); final static String ID; final static String VERSION; final static String STATUS; final static String TRAFFIC; final static String TYPE; static final String CAMPAIGN_NAME; final static String VARIATION; final static String GOALS; static final String SEGMENT_CUSTOM; static final String SEGMENT_PREDEFINED; static final String SEGMENT_DEFAULT; static final String TEST_KEY; static final String TRACK_USER_AUTOMATICALLY; }
@Test public void trackUserManuallyTest() throws IOException, JSONException { VWO vwo = new VWOMock().getVWOMockObject(); String trackUserManually = TestUtils.readJsonFile(getClass(), "com/vwo/mobile/models/track_user_manually.json"); JSONObject object = new JSONObject(trackUserManually); Campaign campaign = new Campaign(vwo, object); Assert.assertFalse(campaign.shouldTrackUserAutomatically()); }