(Moved to dev ML)
+1
This is not consistent.
There is another call to Assert.assertNotSame in
setLabeledFormElementFieldmethod that could be replaced by assertNotEquals.
I'll do it and add a test case.
Regards
Julien
________________________________
De : Jevon Wright <je...@jevon.org>
À : Usage problems for JWebUnit <jwebunit-us...@lists.sourceforge.net>
Envoyé le : Mer 24 novembre 2010, 1h 43min 57s
Objet : Re: [JWebUnit-users] Re : a question regarding assertTitleNotSame
I suggest renaming assertTitleNotSame() to assertTitleNotEquals(), and
deprecating the assertTitleNotSame() method (which calls
assertTitleNotEquals()). There are no other xxxNotSame() methods in the API.
Jevon
On Wed, Nov 24, 2010 at 3:40 AM, Julien HENRY <henr...@yahoo.fr> wrote:
Hi Tony,
>
>As I can't say it is a feature, I guess it's a bug
>
>Could you please submit a bug on Sourceforge?
>
>Thanks
>
>Julien
>
>
>
>
________________________________
De : "Qian, Daqi" <dq...@cas.org>
>À : jwebunit-us...@lists.sourceforge.net
>Envoyé le : Mar 23 novembre 2010, 14h 57min 07s
>Objet : [JWebUnit-users] a question regarding assertTitleNotSame
>
>
>
>
>All,
>
>I have a question regarding assertTitleNotSame(String title).
>
>Accroding to javadoc, this method is to check if the page title is not equal
>to
>the value of title passed in the method.
>
> /**
> * Assert title of current html page in conversation is not
> * equal to another value.
> *
> * @paramtitle
> * unexpected title value
> */
>
>But this method calls Assert.assertNotSame(title,
>getTestEngine().getPageTitle()); Assert.assertNotSame calls following method
>
>staticpublicvoidassertNotSame(String message, Object expected, Object actual) {
> if(expected == actual)
> failSame(message);
> }
>
>As you can see, we are comparing references (addresses in memory), not string
>values. Therefore, assertTitleNotSame(String title) always succeeds.
>
>Thanks,
>Tony
>
>Confidentiality Notice: This electronic message transmission, including any
>attachment(s), may contain confidential, proprietary, or privileged
>information
>from Chemical Abstracts Service (“CAS”), a division of the American Chemical
>Society (“ACS”). If you have received this transmission in error, be advised
>that any disclosure, copying, distribution, or use of the contents of this
>information is strictly prohibited. Please destroy all copies of the message
>and
>contact the sender immediately by either replying to this message or calling
>614-447-3600.
>------------------------------------------------------------------------------
>Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
>Tap into the largest installed PC base & get more eyes on your game by
>optimizing for Intel(R) Graphics Technology. Get started today with the
>Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
>http://p.sf.net/sfu/intelisp-dev2dev
>_______________________________________________
>JWebUnit-users mailing list
>jwebunit-us...@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
>
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
JWebUnit-development mailing list
JWebUnit-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jwebunit-development