Java Arrays.assertNotNull Examples

Java Arrays.assertNotNull - 30 examples found. These are the top rated real world Java examples of java.util.Arrays.assertNotNull extracted from open source projects. You can rate examples to help us improve the quality of examples.
  public void testFindById() throws Exception {
    loadDataSetXml("admin/commserver/seedLocationsAndServices.xml");
    Location[] locations = m_out.getLocations();

    Location firstLocation = locations[0];
    int locationId = firstLocation.getId();

    Location locationById = m_out.getLocation(locationId);
    assertNotNull(locationById);
    assertEquals(firstLocation.getName(), locationById.getName());

    Collection<LocationSpecificService> services = locationById.getServices();
    assertNotNull(services);
    assertEquals(3, services.size());
  }
 @Test
 public void findMergedAnnotationAttributesOnSubSubInheritedAnnotationInterface() {
   AnnotationAttributes attributes =
       findMergedAnnotationAttributes(
           SubSubInheritedAnnotationInterface.class, Transactional.class);
   assertNotNull("Should find @Transactional on SubSubInheritedAnnotationInterface", attributes);
 }
 /**
  * If the "value" entry contains both "DerivedTxConfig" AND "TxConfig", then the algorithm is
  * accidentally picking up shadowed annotations of the same type within the class hierarchy. Such
  * undesirable behavior would cause the logic in {@link
  * org.springframework.context.annotation.ProfileCondition} to fail.
  *
  * @see
  *     org.springframework.core.env.EnvironmentSystemIntegrationTests#mostSpecificDerivedClassDrivesEnvironment_withDevEnvAndDerivedDevConfigClass
  */
 @Test
 public void
     getAllAnnotationAttributesOnClassWithLocalAnnotationThatShadowsAnnotationFromSuperclass() {
   MultiValueMap<String, Object> attributes =
       getAllAnnotationAttributes(DerivedTxConfig.class, TX_NAME);
   assertNotNull("Annotation attributes map for @Transactional on DerivedTxConfig", attributes);
   assertEquals("value for DerivedTxConfig.", asList("DerivedTxConfig"), attributes.get("value"));
 }
 @Test
 public void getAllAnnotationAttributesOnClassWithLocalComposedAnnotationAndInheritedAnnotation() {
   MultiValueMap<String, Object> attributes =
       getAllAnnotationAttributes(SubClassWithInheritedAnnotation.class, TX_NAME);
   assertNotNull(
       "Annotation attributes map for @Transactional on SubClassWithInheritedAnnotation",
       attributes);
   assertEquals(asList("composed2", "transactionManager"), attributes.get("qualifier"));
 }
 @Test
 public void getMergedAnnotationAttributesOnNonInheritedAnnotationInterface() {
   Class<?> element = NonInheritedAnnotationInterface.class;
   String name = Order.class.getName();
   AnnotationAttributes attributes = getMergedAnnotationAttributes(element, name);
   assertNotNull("Should find @Order on NonInheritedAnnotationInterface", attributes);
   // Verify contracts between utility methods:
   assertTrue(isAnnotated(element, name));
 }
 @Test
 public void getMergedAnnotationAttributesOnInheritedAnnotationInterface() {
   Class<?> element = InheritedAnnotationInterface.class;
   String name = TX_NAME;
   AnnotationAttributes attributes = getMergedAnnotationAttributes(element, name);
   assertNotNull("Should find @Transactional on InheritedAnnotationInterface", attributes);
   // Verify contracts between utility methods:
   assertTrue(isAnnotated(element, name));
 }