public class Assertions extends Object
Modifier and Type | Method and Description |
---|---|
static int |
atMostOneOf(Object... namesAndValues)
Accepts 2*N arguments, even ones being names and odd ones being values for those names.
|
static int |
exactlyOneOf(Object... namesAndValues)
Accepts 2*N arguments, even ones being names and odd ones being values for those names.
|
public static int exactlyOneOf(Object... namesAndValues)
null
IllegalStateException
- if more than one argument is non nullIllegalArgumentException
- if the method is called with invalid values (e.g. non even number of args)public static int atMostOneOf(Object... namesAndValues)
null
, or -1 if none was setIllegalStateException
- if more than one argument is non nullIllegalArgumentException
- if the method is called with invalid values (e.g. non even number of args)Copyright © 2016 Pivotal Software, Inc.. All rights reserved.