org.javalite.test.jspec
Class JSpec

java.lang.Object
  extended by org.javalite.test.jspec.JSpec

public final class JSpec
extends Object


Constructor Summary
JSpec()
           
 
Method Summary
static Expectation<Object> a(Object o1)
           
static
<T> void
expect(DifferenceExpectation<T> expectation)
          Expect that the results are different, throw TestException if same.
static
<T> void
expect(ExceptionExpectation<T> expectation)
           
static
<T> Expectation<T>
it(T o1)
          Works the same way as methods the(Object) or a(Object), but takes generalized instance as parameter.
static Expectation<Object> the(Object o1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpec

public JSpec()
Method Detail

a

public static Expectation<Object> a(Object o1)

the

public static Expectation<Object> the(Object o1)

it

public static <T> Expectation<T> it(T o1)
Works the same way as methods the(Object) or a(Object), but takes generalized instance as parameter.
For example you can't use it(12345).shouldBeEqual("12345"); you will get compilation error.
You can perform checking only for the same type instances.
Valid examples:
Not valid examples:

Type Parameters:
T - generic type of expectation
Parameters:
o1 - generic instance for checking
Returns:
generalized expectation

expect

public static <T> void expect(ExceptionExpectation<T> expectation)

expect

public static <T> void expect(DifferenceExpectation<T> expectation)
Expect that the results are different, throw TestException if same.

Parameters:
expectation - difference expectation.


Copyright © 2015 JavaLite. All rights reserved.