ABLUnit the point of OpenEdge.Core.Assert:isTrue( logicalFl

Posted by slacroixak on 17-Mar-2015 03:46

Hi all,

Could someone tell me more about the ABLUnit OpenEdge.Core.Assert:isTrue() method?

The doc mentions only one with a single logicalFlag param, but an overload provides a second char parameter.  I've tried it without noticing the difference.  

Note there are other similar cases with this 2nd char param like isEmpty or isDecimal or isAvailable(handle, char)

Somehow, I was wondering if this option char param could handle a kind of information detail/comment that would appear in some log.

So far, it seems we have to handle each assertion test in an individual method in order to figure out what has failed. How guys do you do that on your side?

Have I missed an ABLUnit sample project somewhere?

Thanks

/SL

All Replies

Posted by DivyaTheja on 17-Mar-2015 05:08

Hello Sebastien,

ABLUnit provides Assert method in two variants.

Assert:IsTrue(logicalVar)

Assert:IsTrue(logicalVar,logicalVarName)

Functionality of both methods is same until assertion fails.

If assertion fails,

1. First method - simply provides message saying "Expected TRUE but was FALSE".

2. Second method - Provides details saying "<logicalVarName> is not true".

As you mentioned, second method provides detailed information of the failure. It is up to the user to use which method. If user wants details of variable/function being failed, they can make use of the second one. As far as i know, there are no ABLUnit sample projects being shipped for .

-DivyaTheja

Posted by slacroixak on 17-Mar-2015 09:56

Thank you Divya, I am glad to see your description meets what I was hoping :)

That being said, with OE11.5 the Second method of  isFalse(someFlag, "someBadCondition)  just reports :

Expected FALSE but was: TRUE    

  and not the "<someBadCondition>" is not false"  that you explained.

Did I miss something or is this going to be available beyond 11.5?

Kind regards

/SL

Posted by DivyaTheja on 17-Mar-2015 10:56
Hello Sebastien,
 
I am able to get the failure message “<var> is not false for IsFalse in 11.5. Here is simple snippet i tried.
 
 
-DivyaTheja
 
[collapse]
From: slacroixak [mailto:bounce-slacroixak@community.progress.com]
Sent: 17 March 2015 08:27
To: TU.OE.Development@community.progress.com
Subject: RE: [Technical Users - OE Development] ABLUnit the point of OpenEdge.Core.Assert:isTrue( logicalFlag, charValue). How do you provide details about an assertion test?
 
Reply by slacroixak

Thank you Divya, I am glad to see your description meets what I was hoping :)

That being said, with OE11.5 the Second method of  isFalse(someFlag, "someBadCondition)  just reports :

Expected FALSE but was: TRUE    

  and not the "<someBadCondition>" is not false"  that you explained.

Did I miss something or is this going to be available beyond 11.5?

Kind regards

/SL

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]
Posted by slacroixak on 18-Mar-2015 10:06

Thank you Divya, now I can also get the additional char info.  It seems that under some circumstances, my propath was inheriting from an ablunit.pl of 11.4 on top of the one of 11.5.  Perhaps this can explain that...

Kind regards

/SL  

This thread is closed