All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dmfs.jems2.confidence.fragile.Throwing Maven / Gradle / Ivy

The newest version!
package org.dmfs.jems2.confidence.fragile;

import org.dmfs.jems2.Fragile;
import org.dmfs.srcless.annotations.staticfactory.StaticFactories;
import org.saynotobugs.confidence.Quality;
import org.saynotobugs.confidence.quality.composite.Has;
import org.saynotobugs.confidence.quality.composite.QualityComposition;
import org.saynotobugs.confidence.quality.object.InstanceOf;


/**
 * {@link Quality} of {@link Fragile} instances throwing an {@link Exception}.
 */
@StaticFactories(value = "Jems2", packageName = "org.dmfs.jems2.confidence")
public final class Throwing extends QualityComposition>
{
    public Throwing(Class throwable)
    {
        this(new InstanceOf<>(throwable));
    }


    public Throwing(Quality delegate)
    {
        super(new Has<>("value()",
            fragile -> fragile::value,
            new org.saynotobugs.confidence.quality.object.Throwing(delegate)));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy