Skip to content

(alpha) NFluent.Web is an extension library to NFluent for web-related tests. NFluent is an ergonomic assertion library which aims to fluent your .NET TDD experience (based on simple Check.That() assertion statements). NFluent aims your tests to be fluent to write (with an happy 'dot' auto completion experience), fluent to read (i.e. as close as…

License

Notifications You must be signed in to change notification settings

tpierrain/NFluent-Web

Repository files navigation

NFluentWeb

NFluent-Web

NFluent.Web is an extension library to NFluent for web-related assertions.

As simple as possible

With NFluent assertion libraries:

All you've got to remember is: Check.That, cause every assertion is then provided via a super-duper-auto-completion-dot-experience ;-)

Usage sample

With NFluent.Web, you can write simple web assertions like this:

    var request = (HttpWebRequest)WebRequest.Create("http://www.google.com");
	request.UserAgent = "Mozilla/5.0 compatible";
	request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip");

    using (var response = (HttpWebResponse)request.GetResponse())
    {
        Check.That(response).StatusCodeEqualsTo(HttpStatusCode.OK)
                            .And.HasHeader(HttpResponseHeader.CacheControl)
                            .And.HasHeader("X-Frame-Options").Which.Contains("SAMEORIGIN")
                            .And.HasHeader(HttpResponseHeader.Server).Which.Contains("gws")
                            .And.IsGZipEncoded()
							.And.Contains("Google");

        // TODO: Allow usage of multiple assertions on a given header such as:  .And.HasHeader("X-Frame-Options").Which.Contains("SAMEORIGIN").And.StartsWith("SAME").And.EndsWith("ORIGIN")
    }

Uses cases

NFluent use cases are available here.

Newsgroup

For any comment, remark or question on the library, please use the NFluent-Discuss google group.

BackLog

Nfluent backlog is available as github issues

New feature to be added?

  • If you want to join the project and contribute: Check this out first, but be our guest.
  • If you don't want to contribute on the library, but you need a feature not yet implemented, don't hesitate to request it on the NFluent-Discuss google group. In any cases: you are welcome!

Many thanks


[email protected] / March 2013

About

(alpha) NFluent.Web is an extension library to NFluent for web-related tests. NFluent is an ergonomic assertion library which aims to fluent your .NET TDD experience (based on simple Check.That() assertion statements). NFluent aims your tests to be fluent to write (with an happy 'dot' auto completion experience), fluent to read (i.e. as close as…

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published