Examples of Slacker


Examples of net.emaze.dysfunctional.dispatching.actions.Slacker

        private AtomicLong accumulator = new AtomicLong();

        @Test
        public void canMonitorARunnable() {
            final Runnable monitor = Spies.monitor(new Slacker(), accumulator);
            Assert.assertNotNull(monitor);
        }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.actions.Slacker

            Assert.assertNotNull(ignoring);
        }

        @Test
        public void canIgnoreParameterForRunnable() {
            final Action<O> ignoring = Dispatching.ignore(new Slacker(), O.class);
            Assert.assertNotNull(ignoring);
        }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.actions.Slacker

        new MonitoringRunnable(null, new AtomicLong());
    }

    @Test(expected = IllegalArgumentException.class)
    public void creatingMonitorWithNullAtomicLongYieldsException() {
        new MonitoringRunnable(new Slacker(), null);
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.actions.Slacker

    }

    @Test
    public void callingIncrementsTheAtomicLong() {
        final AtomicLong state = new AtomicLong();
        final Runnable spy = new MonitoringRunnable(new Slacker(), state);
        spy.run();
        Assert.assertEquals(1l, state.get());
    }
View Full Code Here

Examples of net.emaze.dysfunctional.dispatching.actions.Slacker

            Assert.assertNotNull(adapted);
        }

        @Test
        public void canAdaptRunnableToProvider() {
            final Provider<Void> adapted = Dispatching.provider(new Slacker());
            Assert.assertNotNull(adapted);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.