Verifies that the actual observable has the same value as the given observable.

@param expectedValue the observable value to compare with the actual observables current value.

@return {@code this} assertion instance.
182808
public ObjectPropertyAssert<T> hasSameValue(ObservableObjectValue<T> expectedValue) {
        new ObservableValueAssertions<>(actual).hasSameValue(expectedValue);
        return this;
    }
1065297
public void toEqual(T other) {
		if (this.value == null && other == null) {
			return;
		}
		expectNotNull(this.value, "Expected null to be equal '%s'", other);
		expectNotNull(other, "Expected '%s' to be equal null", this.value);
		expectTrue(this.value.equals(other), "Expected '%s' to be equal '%s'", this.value, other);
	}
948427
public static boolean isIdentical(final String expected, final String actual) {
        final Diff diff = createDiffResult(expected, actual, false);

        return diff.identical();
    }
239881
public static void assertEquals(Object expected, Object actual, String message) {
        if (!Objects.equals(expected, actual)) {
            fail(message);
        }
    }
1314584
public ResultMatcher isNotEqualTo(final Object expected) {
        return new AbstractResultMatcher(path, configuration) {
            public void doMatch(Object actual) {
                Diff diff = createDiff(expected, actual);
                if (diff.similar()) {
                    failWithMessage("JSON is equal.");
                }
            }
        };
    }
349879
public AppValidator succeedsWith(String expectedMessage) {
        stringsToFind.add(expectedMessage);
        stringsToFind.add(APP_START_CODE);
        server.addIgnoredErrors(Collections.singletonList(expectedMessage));
        return this;
    }
859312
public static boolean matchValueByName(String expectedType, Object actualValue) {
		if (expectedType == null)
			return true;
		if (actualValue == null)
			throw new NullPointerException("Actual value cannot be null");

		return matchTypeByName(expectedType, actualValue.getClass());
	}
680801
function( name, actual, expected ) {
		return this.ok( name, actual !== expected, this.notEqual, "\nValues should not match\nActual:" + actual + "\nExpected:" + expected );
	}
650102
public Bindable<T> withExistingValue(T existingValue) {
		Assert.isTrue(
				existingValue == null || this.type.isArray()
						|| this.boxedType.resolve().isInstance(existingValue),
				() -> "ExistingValue must be an instance of " + this.type);
		Supplier<T> value = (existingValue != null) ? () -> existingValue : null;
		return new Bindable<>(this.type, this.boxedType, value, NO_ANNOTATIONS);
	}
209619
public static void assertXpathEvaluatesTo(String expectedValue,
                                              String xpathExpression,
                                              Document inDocument)
        throws XpathException {
        XpathEngine simpleXpathEngine = XMLUnit.newXpathEngine();
        assertEquals(expectedValue,
                     simpleXpathEngine.evaluate(xpathExpression, inDocument));
    }
1305520
def assert_equal(expected, actual)
      return if expected == actual
      raise Failure.new("Equality Failure", expected, actual)
    end
1356795
public boolean compareAndSet(final long expectedValue, final long updateValue)
    {
        return UnsafeAccess.UNSAFE.compareAndSwapLong(byteArray, addressOffset, expectedValue, updateValue);
    }
728848
static public void assertEquals(String message, boolean expected, boolean actual) {
        assertEquals(message, Boolean.valueOf(expected), Boolean.valueOf(actual));
    }
972084
protected static function assertEqual($calculatedValue, $expectedValue, bool $identical = true, bool $exitOnError = false): bool
    {
        $result = $identical 
                ? $calculatedValue === $expectedValue 
                : $calculatedValue ==  $expectedValue;
        $msg = '';
        if (!$result) {
            $value = preg_replace('/  +/', ' ', str_replace("\n", '', print_r($calculatedValue, true)));
            $msg = '     Found: ' . self::varExport($calculatedValue) . ",\n      Expected: " . self::varExport($expectedValue);
        }
        return self::assert($result, $msg, $exitOnError);
    }
1305667
public static function isApply($currentValue, $expectedValue, $operator = self::EQUAL)
    {
        list($currentValue, $expectedValue) = self::convertValues($currentValue, $expectedValue, $operator);

        switch ($operator) {
            case self::LIKE:
                if (stripos($currentValue, $expectedValue) !== false) {
                    return true;
                }
                break;

            case self::LIKE_LEFT:
                $length = strlen($expectedValue);
                $start = 0 - $length;
                $searchedValue = substr($currentValue, $start, $length);
                if (stripos($searchedValue, $expectedValue) !== false) {
                    return true;
                }
                break;

            case self::LIKE_RIGHT:
                $length = strlen($expectedValue);
                $searchedValue = substr($currentValue, 0, $length);
                if (stripos($searchedValue, $expectedValue) !== false) {
                    return true;
                }
                break;

            case self::NOT_LIKE:
                if (stripos($currentValue, $expectedValue) === false) {
                    return true;
                }
                break;

            case self::NOT_LIKE_LEFT:
                $length = strlen($expectedValue);
                $start = 0 - $length;
                $searchedValue = substr($currentValue, $start, $length);
                if (stripos($searchedValue, $expectedValue) === false) {
                    return true;
                }
                break;

            case self::NOT_LIKE_RIGHT:
                $length = strlen($expectedValue);
                $searchedValue = substr($currentValue, 0, $length);
                if (stripos($searchedValue, $expectedValue) === false) {
                    return true;
                }
                break;

            case self::EQUAL:
            case self::IN:
                return $currentValue == $expectedValue;

            case self::NOT_EQUAL:
            case self::NOT_IN:
                return $currentValue != $expectedValue;

            case self::GREATER_EQUAL:
                return $currentValue >= $expectedValue;

            case self::GREATER:
                return $currentValue > $expectedValue;

            case self::LESS_EQUAL:
                return $currentValue <= $expectedValue;

            case self::LESS:
                return $currentValue < $expectedValue;

            case self::BETWEEN:
                if (is_array($expectedValue) && count($expectedValue) >= 2) {
                    if ($currentValue >= $expectedValue[0] && $currentValue <= $expectedValue[1]) {
                        return true;
                    }
                } else {
                    throw new InvalidArgumentException(
                        sprintf(
                            'Between needs exactly an array of two expected values. Give: "%s"',
                            print_r($expectedValue, true)
                        )
                    );
                }
                break;

            default:
                throw new InvalidArgumentException('currently not implemented filter type: "' . $operator . '"');
        }

        return false;
    }
162577
protected boolean sameValue(Object newValue, Object currentValue) {
        if (newValue == NOT_FOUND) {
            return true;
        }
        if (currentValue == NOT_FOUND) {
            currentValue = Undefined.instance;
        }
        // Special rules for numbers: NaN is considered the same value,
        // while zeroes with different signs are considered different.
        if (currentValue instanceof Number && newValue instanceof Number) {
            double d1 = ((Number)currentValue).doubleValue();
            double d2 = ((Number)newValue).doubleValue();
            if (Double.isNaN(d1) && Double.isNaN(d2)) {
                return true;
            }
            if (d1 == 0.0 && Double.doubleToLongBits(d1) != Double.doubleToLongBits(d2)) {
                return false;
            }
        }
        return ScriptRuntime.shallowEq(currentValue, newValue);
    }
1141844
public static boolean isConstant(Expression expression, Object expected) {
        return expression instanceof ConstantExpression && expected.equals(((ConstantExpression) expression).getValue());
    }