com.evolveum.midpoint.test.util
Class TestUtil

java.lang.Object
  extended by com.evolveum.midpoint.test.util.TestUtil

public class TestUtil
extends Object

Unit test utilities.

Author:
Radovan Semancik

Field Summary
static int MAX_EXCEPTION_MESSAGE_LENGTH
           
 
Constructor Summary
TestUtil()
           
 
Method Summary
static void assertElement(List<Object> elements, QName elementQName, String value)
           
static void assertExceptionSanity(ObjectAlreadyExistsException e)
           
static
<T> void
assertPropertyValueSetEquals(Collection<PrismPropertyValue<T>> actual, T... expected)
           
static
<T> void
assertSetEquals(Collection<T> actual, T... expected)
           
static
<T> void
assertSetEquals(String message, Collection<T> actual, T... expected)
           
static String getNodeOid(Node node)
           
static void setAttribute(PrismObject<AccountShadowType> account, QName attrName, QName typeName, PrismContext prismContext, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_EXCEPTION_MESSAGE_LENGTH

public static final int MAX_EXCEPTION_MESSAGE_LENGTH
See Also:
Constant Field Values
Constructor Detail

TestUtil

public TestUtil()
Method Detail

assertPropertyValueSetEquals

public static <T> void assertPropertyValueSetEquals(Collection<PrismPropertyValue<T>> actual,
                                                    T... expected)

assertSetEquals

public static <T> void assertSetEquals(Collection<T> actual,
                                       T... expected)

assertSetEquals

public static <T> void assertSetEquals(String message,
                                       Collection<T> actual,
                                       T... expected)

getNodeOid

public static String getNodeOid(Node node)

setAttribute

public static void setAttribute(PrismObject<AccountShadowType> account,
                                QName attrName,
                                QName typeName,
                                PrismContext prismContext,
                                String value)
                         throws SchemaException
Throws:
SchemaException

assertElement

public static void assertElement(List<Object> elements,
                                 QName elementQName,
                                 String value)

assertExceptionSanity

public static void assertExceptionSanity(ObjectAlreadyExistsException e)


Copyright © 2013 evolveum. All Rights Reserved.