public class AssertionsUtil
extends java.lang.Object
Constructor and Description |
---|
AssertionsUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
assertDuplicate(MboRemote mboOrig,
MboRemote mboCopy,
java.lang.String... skipCols)
Asserts Mbo
mboOrig have been duplicated properly. |
static void |
assertFault(java.lang.Throwable e,
java.lang.String faultType,
java.lang.String group,
java.lang.String key,
boolean okIfAssignable)
Asserts the fault
e is of the type faultType . |
static void |
assertFault(java.lang.Throwable e,
java.lang.String faultType,
java.lang.String group,
java.lang.String key,
java.lang.String bmxid,
boolean okIfAssignable)
Asserts the fault
e is of the type faultType . |
static void |
assertFault(java.lang.Throwable e,
java.lang.String faultType,
java.lang.String group,
java.lang.String key,
java.lang.String bmxid,
boolean okIfAssignable,
boolean maxmsgCheck)
Asserts the fault
e is of the type faultType . |
static MboRemote |
assertLoadTestData(java.lang.String testdataId)
Asserts the test data testdataId resolves to a Mbo.
|
static MboRemote |
assertLoadTestData(java.lang.String testdataId,
UserInfo userInfo)
Asserts the test data testdataId resolves to a Mbo.
|
static void |
assertMaxVarHasValue(java.lang.String orgSite,
java.lang.String varName,
boolean value) |
static void |
assertMaxVarHasValue(java.lang.String orgSite,
java.lang.String varName,
java.lang.String value) |
static void |
assertMaxVarIsFalse(java.lang.String orgSite,
java.lang.String varName) |
static void |
assertMaxVarIsTrue(java.lang.String orgSite,
java.lang.String varName) |
static void |
assertMboAttrEquals(MboRemote mbo,
java.lang.String attributeName,
java.lang.Object expected)
Asserts a Mbo
mbo attribute attributeName value equals
expected value. |
static void |
assertMboAttrEqualsMboAttr(MboRemote mbo,
java.lang.String attributeName,
MboRemote toMbo,
java.lang.String compareToAttrName)
Asserts a Mbo
mbo attribute attributeName value equals
another Mbo toMbo attribute compareToAttrName value. |
static void |
assertMboAttrEqualsMboAttr(MboRemote mbo,
java.lang.String attributeName,
java.lang.String compareToAttrName)
Asserts a Mbo
mbo attribute attributeName value equals
another attribute compareToAttrName value. |
static void |
assertMboAttrHidden(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is hidden |
static void |
assertMboAttrNotEquals(MboRemote mbo,
java.lang.String attributeName,
java.lang.Object unexpected)
Asserts a Mbo
mbo attribute attributeName value is NOT equals to the unexpected value. |
static void |
assertMboAttrNotHidden(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is not hidden |
static void |
assertMboAttrNotNull(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is not null |
static void |
assertMboAttrNotReadonly(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is not readonly |
static void |
assertMboAttrNotRequired(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is not required |
static void |
assertMboAttrNull(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName value is null |
static void |
assertMboAttrReadonly(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is readonly |
static void |
assertMboAttrRequired(MboRemote mbo,
java.lang.String attributeName)
Asserts a Mbo
mbo attribute attributeName is required |
static void |
assertMboHidden(MboRemote mbo)
Asserts Mbo mbo has the selected flag set.
|
static void |
assertMboNotExists(java.lang.String mboName,
long id)
Asserts Mbo mbo is a zombie.
|
static void |
assertMboNotSelected(MboRemote mbo)
Asserts selected flag is not set for the Mbo
|
static void |
assertMboNotZombie(MboRemote mbo)
Asserts Mbo mbo is not a zombie.
|
static void |
assertMboReadonly(MboRemote mbo)
Asserts Mbo mbo has the selected flag set.
|
static void |
assertMboSelected(MboRemote mbo)
Asserts Mbo mbo has the selected flag set.
|
static void |
assertMboSetCountEquals(MboRemote mbo,
java.lang.String relation,
int expectedCount)
Asserts Mbo
mbo related MboSet has count equal to expectedCount |
static void |
assertMboSetCountEquals(MboRemote mbo,
java.lang.String relation,
int expectedCount,
int countFlag)
Asserts Mbo
mbo related MboSet has count for count flag countFlag
equal to expectedCount |
static void |
assertMboSetCountEquals(MboRemote mbo,
java.lang.String objectName,
java.lang.String where,
int expectedCount,
int countFlag,
UserInfo userInfo)
Asserts Mbo
mbo related MboSet has count for count flag countFlag
equal to expectedCount |
static void |
assertMboSetCountEquals(MboRemote mbo,
java.lang.String objectName,
java.lang.String where,
int expectedCount,
UserInfo userInfo)
Asserts Mbo
mbo related MboSet has count for count flag countFlag
equal to expectedCount |
static void |
assertMboSetCountEquals(MboSetRemote mboSet,
int expectedCount)
Asserts MboSet
mboSet has count equal to expectedCount for flag countFlag |
static void |
assertMboSetDiscardable(MboSetRemote mboSet)
Asserts MboSet mboSet is discardable.
|
static void |
assertMboSetFlagSet(MboSetRemote mboSet,
long flag,
java.lang.String flagText)
Asserts flag
flag is set for the MboSet mboSet |
static void |
assertMboSetNoAdd(MboSetRemote mboSet)
Asserts Mbos cannot be added to the MboSet mboSet.
|
static void |
assertMboSetNoDelete(MboSetRemote mboSet)
Asserts Mbos cannot be deleted from MboSet mboSet.
|
static void |
assertMboSetNoSave(MboSetRemote mboSet)
Asserts MboSet mboSet cannot be saved.
|
static void |
assertMboSetNotDiscardable(MboSetRemote mboSet)
Asserts MboSet mboSet is not discardable.
|
static void |
assertMboSetNotReadonly(MboSetRemote mboSet)
Asserts MboSet mboSet is not readonly.
|
static void |
assertMboSetReadonly(MboSetRemote mboSet)
Asserts MboSet mboSet is readonly.
|
static void |
assertMboZombie(MboRemote mbo)
Asserts Mbo mbo is a zombie.
|
static void |
assertOSSchemaValidate(byte[] xml,
java.lang.String osName)
Asserts if the os xml [request/response] conforms to the os service schema
|
static MboRemote |
assertReloadTestData(java.lang.String testdataId)
Asserts the test data testdataId resolves to a certain newly fetched Mbo.
|
static void |
assertWarning(MboRemote mbo,
java.lang.String warningType,
java.lang.String group,
java.lang.String key) |
static void |
assertWarning(MboRemote mbo,
java.lang.String warningType,
java.lang.String group,
java.lang.String key,
boolean okIfAssignable)
Asserts the warning of the type
warningType is set in the Mbo. |
static void |
assertWarning(MboSetRemote mboSet,
java.lang.String warningType,
java.lang.String group,
java.lang.String key) |
static void |
assertWarning(MboSetRemote mboSet,
java.lang.String warningType,
java.lang.String group,
java.lang.String key,
boolean okIfAssignable) |
static java.lang.String |
getMboUniqueIdString(MboRemote mbo) |
static boolean |
isNull(java.lang.String value) |
public static void assertOSSchemaValidate(byte[] xml, java.lang.String osName)
xml
- the os request/response xmlosName
- the name of the object structurepublic static void assertDuplicate(MboRemote mboOrig, MboRemote mboCopy, java.lang.String... skipCols)
mboOrig
have been duplicated properly.mboOrig
- the original MbomboCopy
- the duplicate MboskipCols
- the columns to skip for comparing. This is in addition to the columns that are
marked in the Mbo mboOrig
to be not duplicated.public static MboRemote assertReloadTestData(java.lang.String testdataId)
testdataId
- the test data idpublic static MboRemote assertLoadTestData(java.lang.String testdataId)
testdataId
- the test data idpublic static MboRemote assertLoadTestData(java.lang.String testdataId, UserInfo userInfo)
testdataId
- the test data idpublic static void assertMboSelected(MboRemote mbo)
mbo
- public static void assertMboHidden(MboRemote mbo)
mbo
- public static void assertMboReadonly(MboRemote mbo)
mbo
- public static java.lang.String getMboUniqueIdString(MboRemote mbo) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static void assertMboNotSelected(MboRemote mbo)
mbo
- public static void assertMboNotExists(java.lang.String mboName, long id)
mbo
- public static void assertMboZombie(MboRemote mbo)
mbo
- public static void assertMboNotZombie(MboRemote mbo)
mbo
- public static void assertMboSetReadonly(MboSetRemote mboSet)
mboSet
- public static void assertMboSetNotReadonly(MboSetRemote mboSet)
mboSet
- public static void assertMboSetDiscardable(MboSetRemote mboSet)
mboSet
- public static void assertMboSetNotDiscardable(MboSetRemote mboSet)
mboSet
- public static void assertMboSetNoSave(MboSetRemote mboSet)
mboSet
- public static void assertMboSetNoDelete(MboSetRemote mboSet)
mboSet
- public static void assertMboSetNoAdd(MboSetRemote mboSet)
mboSet
- public static void assertMboSetFlagSet(MboSetRemote mboSet, long flag, java.lang.String flagText)
flag
is set for the MboSet mboSet
mboSet
- MboSet for assertion testflag
- the flag to assert onflagText
- thepublic static void assertMboAttrEqualsMboAttr(MboRemote mbo, java.lang.String attributeName, MboRemote toMbo, java.lang.String compareToAttrName)
mbo
attribute attributeName
value equals
another Mbo toMbo
attribute compareToAttrName
value.mbo
- attributeName
- toMbo
- compareToAttrName
- public static void assertMboAttrEqualsMboAttr(MboRemote mbo, java.lang.String attributeName, java.lang.String compareToAttrName)
mbo
attribute attributeName
value equals
another attribute compareToAttrName
value.mbo
- attributeName
- compareToAttrName
- public static void assertMboAttrEquals(MboRemote mbo, java.lang.String attributeName, java.lang.Object expected)
mbo
attribute attributeName
value equals
expected
value.mbo
- attributeName
- expected
- public static void assertMboAttrNotEquals(MboRemote mbo, java.lang.String attributeName, java.lang.Object unexpected)
mbo
attribute attributeName
value is NOT equals to the unexpected
value.public static void assertMboAttrNull(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
value is nullmbo
- attributeName
- public static void assertMboAttrReadonly(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is readonlymbo
- attributeName
- public static void assertMboAttrHidden(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is hiddenmbo
- attributeName
- public static void assertMboAttrRequired(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is requiredmbo
- attributeName
- public static void assertMboAttrNotNull(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is not nullmbo
- attributeName
- public static void assertMboAttrNotReadonly(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is not readonlymbo
- attributeName
- public static void assertMboAttrNotHidden(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is not hiddenmbo
- attributeName
- public static void assertMboAttrNotRequired(MboRemote mbo, java.lang.String attributeName)
mbo
attribute attributeName
is not requiredmbo
- attributeName
- public static void assertMboSetCountEquals(MboRemote mbo, java.lang.String relation, int expectedCount)
mbo
related MboSet has count equal to expectedCount
mbo
- relation
- relationship nameexpectedCount
- public static void assertMboSetCountEquals(MboSetRemote mboSet, int expectedCount)
mboSet
has count equal to expectedCount
for flag countFlag
mboSet
- MboSet instance to testexpectedCount
- the expected countpublic static void assertMboSetCountEquals(MboRemote mbo, java.lang.String relation, int expectedCount, int countFlag)
mbo
related MboSet has count for count flag countFlag
equal to expectedCount
mbo
- relation
- relationship nameexpectedCount
- countFlag
- count flagpublic static void assertMboSetCountEquals(MboRemote mbo, java.lang.String objectName, java.lang.String where, int expectedCount, UserInfo userInfo)
mbo
related MboSet has count for count flag countFlag
equal to expectedCount
mbo
- objectName
- where
- expectedCount
- userInfo
- public static void assertMboSetCountEquals(MboRemote mbo, java.lang.String objectName, java.lang.String where, int expectedCount, int countFlag, UserInfo userInfo)
mbo
related MboSet has count for count flag countFlag
equal to expectedCount
mbo
- objectName
- related object namewhere
- the where clause for fetching the related object name MboSetexpectedCount
- countFlag
- userInfo
- public static void assertFault(java.lang.Throwable e, java.lang.String faultType, java.lang.String group, java.lang.String key, boolean okIfAssignable)
e
is of the type faultType
. If the fault type
is psdi.util.MXException then the group and key will also be asserted if the values are provided.e
- faultType
- group
- fault groupkey
- fault keyokIfAssignable
- ok if fault not the exact type as faultType but can be assigned from that type.public static void assertFault(java.lang.Throwable e, java.lang.String faultType, java.lang.String group, java.lang.String key, java.lang.String bmxid, boolean okIfAssignable, boolean maxmsgCheck)
e
is of the type faultType
. If the fault type
is psdi.util.MXException then the group and key will also be asserted if the values are provided.e
- the Throwable objectfaultType
- the assert class name of the faultgroup
- the assert group [in case of MXException]key
- the assert group [in case of MXException]bmxid
- the id [in case of MXException]okIfAssignable
- ok if fault not the exact type as faultType but can be assigned from that type.maxmsgCheck
- true would force a check on the maxmessage cache to see if the key is registeredpublic static void assertFault(java.lang.Throwable e, java.lang.String faultType, java.lang.String group, java.lang.String key, java.lang.String bmxid, boolean okIfAssignable)
e
is of the type faultType
. If the fault type
is psdi.util.MXException then the group and key will also be asserted if the values are provided.e
- faultType
- group
- fault groupkey
- fault keybmxid
- fault message idokIfAssignable
- ok if fault not the exact type as faultType but can be assigned from that type.public static void assertWarning(MboRemote mbo, java.lang.String warningType, java.lang.String group, java.lang.String key)
mbo
- warningType
- group
- key
- public static void assertWarning(MboRemote mbo, java.lang.String warningType, java.lang.String group, java.lang.String key, boolean okIfAssignable)
warningType
is set in the Mbo. If the warningType
is psdi.util.MXException then the group and key will also be asserted if the values are provided.mbo
- warningType
- group
- key
- okIfAssignable
- ok if warning not the exact type as warningType but can be assigned from that type.public static void assertWarning(MboSetRemote mboSet, java.lang.String warningType, java.lang.String group, java.lang.String key)
mboSet
- warningType
- group
- key
- public static void assertWarning(MboSetRemote mboSet, java.lang.String warningType, java.lang.String group, java.lang.String key, boolean okIfAssignable)
mboSet
- warningType
- group
- key
- okIfAssignable
- public static boolean isNull(java.lang.String value)
public static void assertMaxVarIsFalse(java.lang.String orgSite, java.lang.String varName) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static void assertMaxVarIsTrue(java.lang.String orgSite, java.lang.String varName) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static void assertMaxVarHasValue(java.lang.String orgSite, java.lang.String varName, java.lang.String value) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static void assertMaxVarHasValue(java.lang.String orgSite, java.lang.String varName, boolean value) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException