Package org.b3log.solo.repository

Examples of org.b3log.solo.repository.OptionRepository


     *
     * @throws Exception exception
     */
    @Test
    public void test() throws Exception {
        final OptionRepository optionRepository = getOptionRepository();

        final JSONObject option = new JSONObject();
        option.put(Keys.OBJECT_ID, Option.ID_C_BROADCAST_CHANCE_EXPIRATION_TIME);
        option.put(Option.OPTION_CATEGORY, Option.CATEGORY_C_BROADCAST);
        option.put(Option.OPTION_VALUE, 0L);

        Transaction transaction = optionRepository.beginTransaction();
        optionRepository.add(option);
        transaction.commit();

        Assert.assertEquals(optionRepository.count(), 1);
        Assert.assertNotNull(optionRepository.get(Option.ID_C_BROADCAST_CHANCE_EXPIRATION_TIME));
    }
View Full Code Here

TOP

Related Classes of org.b3log.solo.repository.OptionRepository

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.