Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 18 | Comments: 72

filter by tags archive

WatiN + MbUnit

time to read 4 min | 660 words

Verifying invalid input...

[RowTest]

[Row(null)]

[Row("")]

[Row("-12314132")]

[Row("foobar")]

[Row("very_long_string_very_long_string_and_so_on_for_another_512_chars")]

public void TryingToEnterWithInvlidPolicyNumberShowsError(string id)

{

    Open("PolicyRequests/NewRequest.aspx?Id="+id);

    AssertNoError();

    AssertContainsText("Can't find Policy with id #"+id,"Should give error message for invalid input");

}


Comments

Espen Albrektsen

This looks good - but I must be missing something.

I know the implementation behind your methods are straightforward - did you write those methods yuorself, or did you import some reference to Watin/MBUnit that I do not know about?

Ayende Rahien

No, those are my own implementations, merely to make it clearer what I am doing.

Open(url) =

ie.GoTo(url)

AssertNoError()=

Assert.IsFalse(ie.ContainsText("exception") )

AssertContainsText(text,msg)=

Assert.IsTrue(ie.ContainsText(text),msg)

Member Blogs

.NET ObjectDataSource and Generics (part 2) C# Callback and Event Mechanisms Unit Testing will be in

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. RavenDB 3.0 New Stable Release - 17 hours from now
  2. Production postmortem: The industry at large - about one day from now
  3. The insidious cost of allocations - 3 days from now
  4. Buffer allocation strategies: A possible solution - 6 days from now
  5. Buffer allocation strategies: Explaining the solution - 7 days from now

And 3 more posts are pending...

There are posts all the way to Sep 11, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    01 Sep 2015 - The case of the lying configuration file
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

RECENT COMMENTS

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats