Creates a new instance of <code>{@link BindingAssert}</code>.

@param <T>    the generic type of the binding.
@param actual the actual value.
@return the created assertion object.
962198
public static <T> BindingAssert<T> assertThat(Binding<T> actual) {
        return new BindingAssert<T>(actual);
    }
1119414
public static ClassAssertion createClassAssertion(OClass ce, ObjectConstant object) throws InconsistentOntologyException {
        if (ce.isTop())
            return null;
        if (ce.isBottom())
            throw new InconsistentOntologyException();

        return new ClassAssertionImpl(ce, object);
    }
360134
function( /* result, actual, expected, message */ ) {
		var assert = this,
			currentTest = ( assert instanceof Assert && assert.test ) || QUnit.config.current;

		// Backwards compatibility fix.
		// Allows the direct use of global exported assertions and QUnit.assert.*
		// Although, it's use is not recommended as it can leak assertions
		// to other tests from async tests, because we only get a reference to the current test,
		// not exactly the test where assertion were intended to be called.
		if ( !currentTest ) {
			throw new Error( "assertion outside test context, in " + sourceFromStacktrace( 2 ) );
		}

		if ( currentTest.usedAsync === true && currentTest.semaphore === 0 ) {
			currentTest.pushFailure( "Assertion after the final `assert.async` was resolved",
				sourceFromStacktrace( 2 ) );

			// Allow this assertion to continue running anyway...
		}

		if ( !( assert instanceof Assert ) ) {
			assert = currentTest.assert;
		}
		return assert.test.push.apply( assert.test, arguments );
	}
701503
static void dataSetAssertion(CallInfo callInfo, DataSet expected, DataSet actual) {
    validateDataSetAssertion(expected, actual);
    DataSource source = expected.getSource();
    Delta delta = new Delta(expected, actual); 
    DataSetAssertion assertion = new DataSetAssertion(expected, delta);
    source.getDB().log(callInfo, assertion);
    
    if (! assertion.passed()) {
      throw new DBAssertionError(callInfo.getMessage());
    }
  }
1168771
public XmlAssert isNotValidAgainst(Object... schemaSources) {
        isNotNull();
        ValidationAssert.create(actual, schemaSources).isInvalid();
        return this;
    }
376160
public XmlAssert isValidAgainst(Schema schema) {
        isNotNull();
        ValidationAssert.create(actual, schema).isValid();
        return this;
    }
262604
public Assertion newAssertion(final AuthenticationStatement authnStatement, final String issuer,
                                  final ZonedDateTime issuedAt, final String id) {
        val assertion = newSamlObject(Assertion.class);

        assertion.setID(id);
        assertion.setIssueInstant(DateTimeUtils.dateTimeOf(issuedAt));
        assertion.setIssuer(issuer);
        assertion.getAuthenticationStatements().add(authnStatement);
        return assertion;
    }
1294040
static void assertTableExistence(CallInfo callInfo, DB db, String tableName, boolean expected) {
    boolean actual = tableExists(callInfo, db, tableName);
    SimpleAssertion assertion = new SimpleAssertion(null, expected, actual);
    db.log(callInfo, assertion);
    if (!assertion.passed()) {
      throw new DBAssertionError(callInfo.getMessage());
    }
  }
948427
public static boolean isIdentical(final String expected, final String actual) {
        final Diff diff = createDiffResult(expected, actual, false);

        return diff.identical();
    }
607832
public static WrongAnnotation wrong(Expectation expected, Object actual)
    {
        WrongAnnotation annotation = wrong();
        annotation.giveDetails( expected, actual );
        return annotation;
    }
163933
@SuppressWarnings("unchecked") // types must agree
  public static <T> T createMockObject(Type type) {
    Class<T> rawType;

    if (type instanceof ParameterizedType) {
      rawType = (Class<T>) ((ParameterizedType) type).getRawType();
    } else if (type instanceof Class) {
      rawType = (Class<T>) type;
    } else {
      throw new UnsupportedOperationException("Unsupported type: "
          + type.getClass().getSimpleName());
    }
    T instance = instantiateObject(rawType);

    return populateObject(instance);
  }
589756
public JsonAssert and(JsonAssertion... assertions) {
        Arrays.stream(assertions).forEach(a -> a.doAssert(this));
        return this;
    }
583700
public static AssertionError expectFailure(StandardSubjectBuilderCallback assertionCallback) {
    ExpectFailure expectFailure = new ExpectFailure();
    expectFailure.enterRuleContext(); // safe since this instance doesn't leave this method
    assertionCallback.invokeAssertion(expectFailure.whenTesting());
    return expectFailure.getFailure();
  }
998566
public AccessAssertion unmarshal(final JSONObject encodedAssertion) {
        final String className;
        try {
            className = encodedAssertion.getString(JSON_CLASS_NAME);
            final Class<?> assertionClass =
                    Thread.currentThread().getContextClassLoader().loadClass(className);
            final AccessAssertion assertion =
                    (AccessAssertion) this.applicationContext.getBean(assertionClass);
            assertion.unmarshal(encodedAssertion);

            return assertion;
        } catch (JSONException | ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
306446
private Status executeAssert(Stmt.Assert stmt, CallStack frame, EnclosingScope scope) {
		//
		checkInvariants(frame,stmt.getCondition());
		return Status.NEXT;
	}
634166
private AssertionError createComparisonFailure(String className, String expected, String actual) throws Exception {
		Class<?> clazz = Class.forName(className);
		Constructor<?> constructor = clazz.getConstructor(String.class, String.class, String.class);
		return (AssertionError) constructor.newInstance("", expected, actual);
	}
700409
function(actual) {
      function assert(matcher, args, negate) {
        var expected = toArray(args, 1)
        matcher.negate = negate  
        assertion = new JSpec.Assertion(matcher, actual, expected, negate)
        hook('beforeAssertion', assertion)
        if (matcher.defer) assertion.run()
        else JSpec.currentSpec.assertions.push(assertion.run().report()), hook('afterAssertion', assertion)
        return assertion.result
      }
      
      function to(matcher) {
        return assert(matcher, arguments, false)
      }
      
      function not_to(matcher) {
        return assert(matcher, arguments, true)
      }
      
      return {
        to : to,
        should : to,
        not_to: not_to,
        should_not : not_to
      }
    }