Andy Blake · Jun 30, 2021

UnitTest Assertion on a stringc

Hi, I need to assert that a string is a certain value.

$$$AssertEquals("String value""Value expected""Should return correct value")

When running this I get an INVALID OREF error.

Is there any Assertion method I can use where the first parameter can be string like above, rather than an instance of a class as I can see on the documentation?



Product version: Caché 2018.1
0 137
Discussion (2)1
Log in or sign up to continue

Asserts work on a string, here's an example.

Can you post a minimal example which causes INVALID OREF error?

I believe this error happen because you are trying to execute this code in the class method, not instance method.

Can you please provide a full class definition and how you are executing the test?