expected and actual values in message of Validate.Attribute

Class library usage, coding and language questions.
User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

expected and actual values in message of Validate.Attribute

Post by slavikf » Tue Apr 05, 2011 6:03 pm

I saw following in 3.0.1 description:
- Added placeholders for expected and actual values in message of Validate.Attribute methods
So, is there any documentation available for that? Or is it for the future?

Also, when i look at existing documentation:
http://www.ranorex.com/Documentation/Ranorex-2.0/
It says 2.0 in URL. Do you have other documentation for 3.0? Where?

User avatar
slavikf
Posts: 104
Joined: Mon Sep 13, 2010 9:07 pm
Location: Toronto, Canada
Contact:

Re: expected and actual values in message of Validate.Attribute

Post by slavikf » Tue Apr 05, 2011 6:21 pm

Found here (at the bottom of the page):
http://www.ranorex.com/Documentation/Ra ... lidate.htm

You can use the following variables in messages you pass to the Validate methods that are replaced by the following values depending on the result of the validation:
Variable Value if validation succeeds Value if validation fails
"@[email protected]"
"succeeded"
"failed"
"@[email protected]"
""
"not "
"@[email protected]"
"not "
""

For example, the following message will be transformed according to the outcome of the validation:

bool condition = true;
Validate.IsTrue(condition, "The validation @[email protected]");

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: expected and actual values in message of Validate.Attribute

Post by Support Team » Tue Apr 05, 2011 6:31 pm

slavikf wrote:http://www.ranorex.com/Documentation/Ranorex-2.0/
It says 2.0 in URL. Do you have other documentation for 3.0? Where?
We used the same URL for backwards compatibility, it always points to the latest Ranorex API documentation. We will probably add a URL rewrite without a version number in it :D

Regards,
Alex
Ranorex Team
.
Image