This project is read-only.

XAT: Problem with AssertCannotBeSaved

Feb 2, 2012 at 7:30 AM
Edited Feb 2, 2012 at 7:45 AM

I am loving the XATs :).

I'm just having strange behavior.

Setup code:

              var iPerson = newPersonAc.InvokeReturnObject ();
                iPerson.AssertCannotBeSaved ();
                var iName = iPerson.GetPropertyByName ("First Name").AssertIsVisible ().AssertIsModifiable ().AssertIsMandatory ();

Then, If I have this, it executes correctly.
                iName.SetValue ("..."));
                iPerson.AssertCanBeSaved ();

And this fails as expected, because the First Name is manditory.

                //iName.SetValue ("..."));
                iPerson.AssertCanBeSaved ();

But this passes fine, even though it shouldn't because the First Name is manditory.

                //iName.SetValue ("..."));
                iPerson.AssertCannotBeSaved ();

Any ideas?

Even this passes, which is clearly contradictory:

                iName.SetValue ("..."));
                iPerson.AssertCanBeSaved ();
                iPerson.AssertCannotBeSaved ();

Feb 2, 2012 at 9:07 AM

From your last example alone it is clear that this must be a bug in the XAT framework.  Please raise it as an issue on Issue Tracker.  You might also like to look at the XAT source code  -  as it might be something quite simple that is wrong.

 

Feb 2, 2012 at 9:16 AM

Tnx. Will do.