Code example for Animation

Methods: cancelstart

0
        matcher = newAnimationMatcher(animation);
    } 
 
    @Test 
    public void shouldKnowWhenAnimationIsStarted() throws Exception { 
        animation.start();
        expect(matcher.toHaveStarted()).toBeTrue();
 
        animation.cancel();
        expect(matcher.toHaveStarted()).toBeFalse();
    } 
 
    private <T extends Animation> AnimationMatcher<T, ?> newAnimationMatcher(T value) {
        AnimationMatcher matcher = new AnimationMatcher();
        GreatExpectations.setActual(matcher, value);
        return matcher;
    } 
}