Class ShouldNotBeInstanceOfAny

  • All Implemented Interfaces:
    ErrorMessageFactory

    public class ShouldNotBeInstanceOfAny
    extends BasicErrorMessageFactory
    Creates an error message indicating that an assertion that verifies that an object is not an instance of one or more types failed.
    Author:
    Nicolas François
    • Constructor Detail

      • ShouldNotBeInstanceOfAny

        private ShouldNotBeInstanceOfAny​(Object actual,
                                         Class<?>[] types)
      • ShouldNotBeInstanceOfAny

        private ShouldNotBeInstanceOfAny​(Throwable throwable,
                                         Class<?>[] types)
    • Method Detail

      • shouldNotBeInstanceOfAny

        public static ErrorMessageFactory shouldNotBeInstanceOfAny​(Object actual,
                                                                   Class<?>[] types)
        Parameters:
        actual - the actual value in the failed assertion.
        types - contains the type or types actual is expected to belong to.
        Returns:
        the created ErrorMessageFactory.