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

sample.junit5.AssertJunit5Style Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package sample.junit5;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.util.function.Function;

public class AssertJunit5Style {

    @Test
    void withoutAsserts() {
        Function toLowerCase = input -> input.toLowerCase();
        toLowerCase.apply("ZZZ");
    }

    @Test
    void withAsserts() {
        Assertions.assertTrue(true);
        Assertions.assertArrayEquals(new int[]{1,2}, new int[]{1,2} );
    }

    @Test
    @Disabled
    void iAmDisabled(){
        throw new UnsupportedOperationException();
    }

    void iAmNotATest1(){
        throw new UnsupportedOperationException();
    }

    @Deprecated
    void iAmNotATest2(){
        throw new UnsupportedOperationException();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy