Package ru.aristar.jnuget.common

Examples of ru.aristar.jnuget.common.TriggerOptions


    @Test
    public void testCreatePushStrategyTriggers() throws Exception {
        //GIVEN
        PackageSourceFactory sourceFactory = new PackageSourceFactory();
        PackageSourceFactory.instance = sourceFactory;
        final TriggerOptions triggerOptions = new TriggerOptions();
        triggerOptions.setClassName(RemoveOldVersionTrigger.class.getCanonicalName());
        triggerOptions.getProperties().put("maxPackageCount", "5");
        //WHEN
        AfterTrigger pushTrigger = sourceFactory.createTrigger(triggerOptions, AfterTrigger.class);
        //THEN
        assertThat("Триггер создан", pushTrigger, is(notNullValue()));
        assertThat("Созданый триггер", pushTrigger, instanceOf(RemoveOldVersionTrigger.class));
View Full Code Here


    public void testCreatePushStrategyWithTriggers() throws Exception {
        //GIVEN
        PackageSourceFactory sourceFactory = new PackageSourceFactory();
        PackageSourceFactory.instance = sourceFactory;
        //Триггер после помещения пакета
        final TriggerOptions aftherTriggerOptions = new TriggerOptions();
        aftherTriggerOptions.setClassName(RemoveOldVersionTrigger.class.getCanonicalName());
        aftherTriggerOptions.getProperties().put("maxPackageCount", "5");
        //Триггер до помещения пакета
        final TriggerOptions beforeTriggerOptions = new TriggerOptions();
        beforeTriggerOptions.setClassName(TestBeforeTrigger.class.getCanonicalName());
        beforeTriggerOptions.getProperties().put("testProperty", "15");
        //Стратегия фиксации
        StorageOptions storageOptions = new StorageOptions();
        storageOptions.setStorageName("storage");
        storageOptions.getAftherTriggersOptions().add(aftherTriggerOptions);
        storageOptions.getBeforeTriggersOptions().add(beforeTriggerOptions);
View Full Code Here

TOP

Related Classes of ru.aristar.jnuget.common.TriggerOptions

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.