{"__v":2,"_id":"54d902d6c263bf2d003bb991","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"## Docs are moving!\n\n[To ReadTheDocs](http://shouldly.readthedocs.org/en/latest)\n\nPlease help out! See the GitHub issue with what is left at https://github.com/shouldly/shouldly/issues/309","category":"54d902d5c263bf2d003bb96b","createdAt":"2015-01-30T10:13:39.379Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":0,"project":"54cb556861698d0d00baf7a2","slug":"overview","sync_unique":"","title":"Overview","type":"basic","updates":[],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

Overview


## Docs are moving! [To ReadTheDocs](http://shouldly.readthedocs.org/en/latest) Please help out! See the GitHub issue with what is left at https://github.com/shouldly/shouldly/issues/309
## Docs are moving! [To ReadTheDocs](http://shouldly.readthedocs.org/en/latest) Please help out! See the GitHub issue with what is left at https://github.com/shouldly/shouldly/issues/309
{"__v":1,"_id":"54d902d6c263bf2d003bb994","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeOneOf()\\n{\\n    var apu = new Person() { Name = \\\"Apu\\\" };\\n    var homer = new Person() { Name = \\\"Homer\\\" };\\n    var skinner = new Person() { Name = \\\"Skinner\\\" };\\n    var barney = new Person() { Name = \\\"Barney\\\" };\\n    var theBeSharps = new List<Person>() { homer, skinner, barney };\\n\\n    apu.ShouldBeOneOf(theBeSharps.ToArray());\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n    apu\\n        should be one of\\n    [Homer, Skinner, Barney]\\n        but was\\n    Apu\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96c","createdAt":"2015-01-30T10:11:19.768Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":2,"project":"54cb556861698d0d00baf7a2","slug":"shouldbeoneof","sync_unique":"","title":"ShouldBeOneOf","type":"basic","updates":["5524206fd460483900119328"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldBeOneOf


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeOneOf()\n{\n var apu = new Person() { Name = \"Apu\" };\n var homer = new Person() { Name = \"Homer\" };\n var skinner = new Person() { Name = \"Skinner\" };\n var barney = new Person() { Name = \"Barney\" };\n var theBeSharps = new List<Person>() { homer, skinner, barney };\n\n apu.ShouldBeOneOf(theBeSharps.ToArray());\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n apu\n should be one of\n [Homer, Skinner, Barney]\n but was\n Apu", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeOneOf()\n{\n var apu = new Person() { Name = \"Apu\" };\n var homer = new Person() { Name = \"Homer\" };\n var skinner = new Person() { Name = \"Skinner\" };\n var barney = new Person() { Name = \"Barney\" };\n var theBeSharps = new List<Person>() { homer, skinner, barney };\n\n apu.ShouldBeOneOf(theBeSharps.ToArray());\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n apu\n should be one of\n [Homer, Skinner, Barney]\n but was\n Apu", "language": "text" } ], "sidebar": true } [/block]
{"__v":1,"_id":"54d902d6c263bf2d003bb995","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotBeOneOf()\\n{\\n    var apu = new Person() { Name = \\\"Apu\\\" };\\n    var homer = new Person() { Name = \\\"Homer\\\" };\\n    var skinner = new Person() { Name = \\\"Skinner\\\" };\\n    var barney = new Person() { Name = \\\"Barney\\\" };\\n    var wiggum = new Person() { Name = \\\"Wiggum\\\" };\\n    var theBeSharps = new List<Person>() { apu, homer, skinner, barney, wiggum };\\n\\n    wiggum.ShouldNotBeOneOf(theBeSharps.ToArray());\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n    wiggum\\n        should not be one of\\n    [Apu, Homer, Skinner, Barney, Wiggum]\\n        but was\\n    Wiggum\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96c","createdAt":"2015-01-30T10:11:39.339Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":3,"project":"54cb556861698d0d00baf7a2","slug":"shouldnotbeoneof","sync_unique":"","title":"ShouldNotBeOneOf","type":"basic","updates":["552420a571c0542100993546"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldNotBeOneOf


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotBeOneOf()\n{\n var apu = new Person() { Name = \"Apu\" };\n var homer = new Person() { Name = \"Homer\" };\n var skinner = new Person() { Name = \"Skinner\" };\n var barney = new Person() { Name = \"Barney\" };\n var wiggum = new Person() { Name = \"Wiggum\" };\n var theBeSharps = new List<Person>() { apu, homer, skinner, barney, wiggum };\n\n wiggum.ShouldNotBeOneOf(theBeSharps.ToArray());\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n wiggum\n should not be one of\n [Apu, Homer, Skinner, Barney, Wiggum]\n but was\n Wiggum", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotBeOneOf()\n{\n var apu = new Person() { Name = \"Apu\" };\n var homer = new Person() { Name = \"Homer\" };\n var skinner = new Person() { Name = \"Skinner\" };\n var barney = new Person() { Name = \"Barney\" };\n var wiggum = new Person() { Name = \"Wiggum\" };\n var theBeSharps = new List<Person>() { apu, homer, skinner, barney, wiggum };\n\n wiggum.ShouldNotBeOneOf(theBeSharps.ToArray());\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n wiggum\n should not be one of\n [Apu, Homer, Skinner, Barney, Wiggum]\n but was\n Wiggum", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96c","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb996","createdAt":"2015-02-04T12:55:52.911Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":4,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeGreaterThan_Example_1()\\n{\\n    1.ShouldBeGreaterThan(2);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Messages\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    1\\n        should be greater than\\n    2\\n        but was\\n    1\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeGreaterThan_Example_2()\\n{\\n    var mrBurns = new Person() { Name = \\\"Mr. Burns\\\", Salary = 30000 };\\n    mrBurns.Salary.ShouldBeGreaterThan(300000000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    mrBurns.Salary\\n        should be greater than\\n    300000000\\n        but was\\n    30000\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldbegreaterthan","type":"basic","title":"ShouldBeGreaterThan","childrenPages":[]}

ShouldBeGreaterThan


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeGreaterThan_Example_1()\n{\n 1.ShouldBeGreaterThan(2);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n 1\n should be greater than\n 2\n but was\n 1", "language": "text" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeGreaterThan_Example_2()\n{\n var mrBurns = new Person() { Name = \"Mr. Burns\", Salary = 30000 };\n mrBurns.Salary.ShouldBeGreaterThan(300000000);\n}", "language": "csharp" } ] } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n mrBurns.Salary\n should be greater than\n 300000000\n but was\n 30000", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeGreaterThan_Example_1()\n{\n 1.ShouldBeGreaterThan(2);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n 1\n should be greater than\n 2\n but was\n 1", "language": "text" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeGreaterThan_Example_2()\n{\n var mrBurns = new Person() { Name = \"Mr. Burns\", Salary = 30000 };\n mrBurns.Salary.ShouldBeGreaterThan(300000000);\n}", "language": "csharp" } ] } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n mrBurns.Salary\n should be greater than\n 300000000\n but was\n 30000", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96c","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb997","createdAt":"2015-02-04T13:03:37.340Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":5,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeLessThan()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 300000000 };\\n    homer.Salary.ShouldBeLessThan(30000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Messages\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    homer.Salary\\n        should be less than\\n    30000\\n        but was\\n    300000000\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldbelessthan","type":"basic","title":"ShouldBeLessThan","childrenPages":[]}

ShouldBeLessThan


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeLessThan()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 300000000 };\n homer.Salary.ShouldBeLessThan(30000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n homer.Salary\n should be less than\n 30000\n but was\n 300000000", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeLessThan()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 300000000 };\n homer.Salary.ShouldBeLessThan(30000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n homer.Salary\n should be less than\n 30000\n but was\n 300000000", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96c","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb998","createdAt":"2015-02-04T13:03:58.475Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":6,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeOfType()\\n{\\n    var theSimpsonsDog = new Cat() { Name = \\\"Santas little helper\\\" };\\n    theSimpsonsDog.ShouldBeOfType<Dog>();\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Messages\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    theSimpsonsDog\\n        should be of type\\n    Simpsons.Dog\\n        but was\\n    Simpsons.Cat\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldbeoftype","type":"basic","title":"ShouldBeOfType","childrenPages":[]}

ShouldBeOfType


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeOfType()\n{\n var theSimpsonsDog = new Cat() { Name = \"Santas little helper\" };\n theSimpsonsDog.ShouldBeOfType<Dog>();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n theSimpsonsDog\n should be of type\n Simpsons.Dog\n but was\n Simpsons.Cat", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeOfType()\n{\n var theSimpsonsDog = new Cat() { Name = \"Santas little helper\" };\n theSimpsonsDog.ShouldBeOfType<Dog>();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n theSimpsonsDog\n should be of type\n Simpsons.Dog\n but was\n Simpsons.Cat", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96c","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb999","createdAt":"2015-02-04T13:04:17.229Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":7,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeAssignableTo()\\n{\\n    var theSimpsonsDog = new Person() { Name = \\\"Santas little helper\\\" };\\n    theSimpsonsDog.ShouldBeAssignableTo<Pet>();\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Messages\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    theSimpsonsDog\\n        should be assignable to\\n    Simpsons.Pet\\n        but was\\n    Simpsons.Person\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldbeassignableto","type":"basic","title":"ShouldBeAssignableTo","childrenPages":[]}

ShouldBeAssignableTo


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeAssignableTo()\n{\n var theSimpsonsDog = new Person() { Name = \"Santas little helper\" };\n theSimpsonsDog.ShouldBeAssignableTo<Pet>();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n theSimpsonsDog\n should be assignable to\n Simpsons.Pet\n but was\n Simpsons.Person", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeAssignableTo()\n{\n var theSimpsonsDog = new Person() { Name = \"Santas little helper\" };\n theSimpsonsDog.ShouldBeAssignableTo<Pet>();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n theSimpsonsDog\n should be assignable to\n Simpsons.Pet\n but was\n Simpsons.Person", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96c","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb99a","createdAt":"2015-02-04T13:04:37.526Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":8,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeInRange()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 300000000 };\\n    homer.Salary.ShouldBeInRange(30000, 40000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Messages\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    homer.Salary\\n        should be in range\\n    { from = 30000, to = 40000 }\\n        but was\\n    300000000\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldbeinrange","type":"basic","title":"ShouldBeInRange","childrenPages":[]}

ShouldBeInRange


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeInRange()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 300000000 };\n homer.Salary.ShouldBeInRange(30000, 40000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n homer.Salary\n should be in range\n { from = 30000, to = 40000 }\n but was\n 300000000", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeInRange()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 300000000 };\n homer.Salary.ShouldBeInRange(30000, 40000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n homer.Salary\n should be in range\n { from = 30000, to = 40000 }\n but was\n 300000000", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96c","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb99b","createdAt":"2015-02-04T13:04:58.727Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":9,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotBeInRange()\\n{\\n    var mrBurns = new Person() { Name = \\\"Mr. Burns\\\", Salary = 30000 };\\n    mrBurns.Salary.ShouldNotBeInRange(30000, 40000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Messages\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    mrBurns.Salary\\n        should not be in range\\n    { from = 30000, to = 40000 }\\n        but was\\n    30000\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotbeinrange","type":"basic","title":"ShouldNotBeInRange","childrenPages":[]}

ShouldNotBeInRange


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotBeInRange()\n{\n var mrBurns = new Person() { Name = \"Mr. Burns\", Salary = 30000 };\n mrBurns.Salary.ShouldNotBeInRange(30000, 40000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n mrBurns.Salary\n should not be in range\n { from = 30000, to = 40000 }\n but was\n 30000", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotBeInRange()\n{\n var mrBurns = new Person() { Name = \"Mr. Burns\", Salary = 30000 };\n mrBurns.Salary.ShouldNotBeInRange(30000, 40000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Messages", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n mrBurns.Salary\n should not be in range\n { from = 30000, to = 40000 }\n but was\n 30000", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96d","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb988","createdAt":"2015-02-04T17:47:31.882Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldStartWith()\\n{\\n    var lenny = new Person() { Name = \\\"Carl\\\"};\\n    lenny.Name.ShouldStartWith(\\\"Len\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    lenny.Name\\n        should start with\\n    \\\"Len\\\"\\n        but was\\n    \\\"Carl\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldstartwith","type":"basic","title":"ShouldStartWith","childrenPages":[]}

ShouldStartWith


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldStartWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldStartWith(\"Len\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should start with\n \"Len\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldStartWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldStartWith(\"Len\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should start with\n \"Len\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96d","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb97f","createdAt":"2015-02-04T13:06:20.397Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldAllBe_Predicate()\\n{\\n    var mrBurns = new Person() { Name = \\\"Mr.Burns\\\", Salary=3000000};\\n    var kentBrockman = new Person() { Name = \\\"Homer\\\", Salary = 3000000};\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var millionares = new List<Person>() {mrBurns, kentBrockman, homer};\\n\\n    millionares.ShouldAllBe(m => m.Salary > 1000000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    millionares\\n        should all be an element satisfying the condition\\n    (m.Salary > 1000000)\\n        but does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldallbe","type":"basic","title":"ShouldAllBe","childrenPages":[]}

ShouldAllBe


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldAllBe_Predicate()\n{\n var mrBurns = new Person() { Name = \"Mr.Burns\", Salary=3000000};\n var kentBrockman = new Person() { Name = \"Homer\", Salary = 3000000};\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var millionares = new List<Person>() {mrBurns, kentBrockman, homer};\n\n millionares.ShouldAllBe(m => m.Salary > 1000000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionares\n should all be an element satisfying the condition\n (m.Salary > 1000000)\n but does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldAllBe_Predicate()\n{\n var mrBurns = new Person() { Name = \"Mr.Burns\", Salary=3000000};\n var kentBrockman = new Person() { Name = \"Homer\", Salary = 3000000};\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var millionares = new List<Person>() {mrBurns, kentBrockman, homer};\n\n millionares.ShouldAllBe(m => m.Salary > 1000000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionares\n should all be an element satisfying the condition\n (m.Salary > 1000000)\n but does not", "language": "text" } ], "sidebar": true } [/block]
{"__v":2,"_id":"54d902d6c263bf2d003bb980","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldContain()\\n{\\n    var mrBurns = new Person() { Name = \\\"Mr.Burns\\\", Salary=3000000};\\n    var kentBrockman = new Person() { Name = \\\"Homer\\\", Salary = 3000000};\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var millionares = new List<Person>() {kentBrockman, homer};\\n\\n    millionares.ShouldContain(mrBurns);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n    millionares\\n        should contain\\n    Mr.Burns\\n        but does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96d","createdAt":"2015-02-04T13:06:41.912Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":2,"project":"54cb556861698d0d00baf7a2","slug":"shouldcontain","sync_unique":"","title":"ShouldContain","type":"basic","updates":["55242106f3551e0d002c7209"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldContain


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldContain()\n{\n var mrBurns = new Person() { Name = \"Mr.Burns\", Salary=3000000};\n var kentBrockman = new Person() { Name = \"Homer\", Salary = 3000000};\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var millionares = new List<Person>() {kentBrockman, homer};\n\n millionares.ShouldContain(mrBurns);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n millionares\n should contain\n Mr.Burns\n but does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldContain()\n{\n var mrBurns = new Person() { Name = \"Mr.Burns\", Salary=3000000};\n var kentBrockman = new Person() { Name = \"Homer\", Salary = 3000000};\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var millionares = new List<Person>() {kentBrockman, homer};\n\n millionares.ShouldContain(mrBurns);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n millionares\n should contain\n Mr.Burns\n but does not", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96d","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb981","createdAt":"2015-02-04T17:43:55.702Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":3,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldContain_Predicate()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var moe = new Person() { Name = \\\"Moe\\\", Salary=20000};\\n    var barney = new Person() { Name = \\\"Barney\\\", Salary = 0};\\n    var millionares = new List<Person>() {homer, moe, barney};\\n\\n    // Check if at least one element in the IEnumerable satisfies the predicate\\n    millionares.ShouldContain(m => m.Salary > 1000000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    millionares\\n        should contain an element satisfying the condition\\n    (m.Salary > 1000000)\\n        but does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldcontainpredicate","type":"basic","title":"ShouldContain(Predicate)","childrenPages":[]}

ShouldContain(Predicate)


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldContain_Predicate()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var moe = new Person() { Name = \"Moe\", Salary=20000};\n var barney = new Person() { Name = \"Barney\", Salary = 0};\n var millionares = new List<Person>() {homer, moe, barney};\n\n // Check if at least one element in the IEnumerable satisfies the predicate\n millionares.ShouldContain(m => m.Salary > 1000000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionares\n should contain an element satisfying the condition\n (m.Salary > 1000000)\n but does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldContain_Predicate()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var moe = new Person() { Name = \"Moe\", Salary=20000};\n var barney = new Person() { Name = \"Barney\", Salary = 0};\n var millionares = new List<Person>() {homer, moe, barney};\n\n // Check if at least one element in the IEnumerable satisfies the predicate\n millionares.ShouldContain(m => m.Salary > 1000000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionares\n should contain an element satisfying the condition\n (m.Salary > 1000000)\n but does not", "language": "text" } ], "sidebar": true } [/block]
{"__v":1,"_id":"54d902d6c263bf2d003bb982","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldNotContain()\\n{\\n    var homerSimpson = new Person() { Name = \\\"Homer\\\"};\\n    var homerGlumplich  = new Person() { Name = \\\"Homer\\\"};\\n    var lenny = new Person() { Name = \\\"Lenny\\\"};\\n    var carl = new Person() { Name = \\\"carl\\\"};\\n    var clubOfNoHomers = new List<Person>() {homerSimpson, homerGlumplich, lenny, carl };\\n\\n    clubOfNoHomers.ShouldNotContain(homerSimpson);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n    clubOfNoHomers\\n        should not contain\\n    Homer\\n        but does\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96d","createdAt":"2015-02-04T17:44:29.003Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":4,"project":"54cb556861698d0d00baf7a2","slug":"shouldnotcontain","sync_unique":"","title":"ShouldNotContain","type":"basic","updates":["5524213cf3551e0d002c720b"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldNotContain


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldNotContain()\n{\n var homerSimpson = new Person() { Name = \"Homer\"};\n var homerGlumplich = new Person() { Name = \"Homer\"};\n var lenny = new Person() { Name = \"Lenny\"};\n var carl = new Person() { Name = \"carl\"};\n var clubOfNoHomers = new List<Person>() {homerSimpson, homerGlumplich, lenny, carl };\n\n clubOfNoHomers.ShouldNotContain(homerSimpson);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n clubOfNoHomers\n should not contain\n Homer\n but does", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldNotContain()\n{\n var homerSimpson = new Person() { Name = \"Homer\"};\n var homerGlumplich = new Person() { Name = \"Homer\"};\n var lenny = new Person() { Name = \"Lenny\"};\n var carl = new Person() { Name = \"carl\"};\n var clubOfNoHomers = new List<Person>() {homerSimpson, homerGlumplich, lenny, carl };\n\n clubOfNoHomers.ShouldNotContain(homerSimpson);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n clubOfNoHomers\n should not contain\n Homer\n but does", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96d","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb983","createdAt":"2015-02-04T17:45:03.041Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":5,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldNotContain_Predicate()\\n{\\n    var mrBurns = new Person() { Name = \\\"Mr.Burns\\\", Salary=3000000};\\n    var kentBrockman = new Person() { Name = \\\"Homer\\\", Salary = 3000000};\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var millionares = new List<Person>() {mrBurns, kentBrockman, homer};\\n\\n    millionares.ShouldNotContain(m => m.Salary < 1000000);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    millionares\\n        should not contain an element satisfying the condition\\n    (m.Salary < 1000000)\\n        but does \",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotcontainpredicate","type":"basic","title":"ShouldNotContain(Predicate)","childrenPages":[]}

ShouldNotContain(Predicate)


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldNotContain_Predicate()\n{\n var mrBurns = new Person() { Name = \"Mr.Burns\", Salary=3000000};\n var kentBrockman = new Person() { Name = \"Homer\", Salary = 3000000};\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var millionares = new List<Person>() {mrBurns, kentBrockman, homer};\n\n millionares.ShouldNotContain(m => m.Salary < 1000000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionares\n should not contain an element satisfying the condition\n (m.Salary < 1000000)\n but does ", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldNotContain_Predicate()\n{\n var mrBurns = new Person() { Name = \"Mr.Burns\", Salary=3000000};\n var kentBrockman = new Person() { Name = \"Homer\", Salary = 3000000};\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var millionares = new List<Person>() {mrBurns, kentBrockman, homer};\n\n millionares.ShouldNotContain(m => m.Salary < 1000000);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionares\n should not contain an element satisfying the condition\n (m.Salary < 1000000)\n but does ", "language": "text" } ], "sidebar": true } [/block]
{"__v":1,"_id":"54d902d6c263bf2d003bb984","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldBeEmpty()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\"};\\n    var powerPlantOnTheWeekend = new List<Person>() {homer};\\n    powerPlantOnTheWeekend.ShouldBeEmpty(); \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n    powerPlantOnTheWeekend\\n            should be empty\\n        but had 1 item and was [Homer]\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96d","createdAt":"2015-02-04T17:45:29.066Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":6,"project":"54cb556861698d0d00baf7a2","slug":"shouldbeempty","sync_unique":"","title":"ShouldBeEmpty","type":"basic","updates":["5524215ff13be93700fee215"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldBeEmpty


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldBeEmpty()\n{\n var homer = new Person() { Name = \"Homer\"};\n var powerPlantOnTheWeekend = new List<Person>() {homer};\n powerPlantOnTheWeekend.ShouldBeEmpty(); \n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n powerPlantOnTheWeekend\n should be empty\n but had 1 item and was [Homer]", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldBeEmpty()\n{\n var homer = new Person() { Name = \"Homer\"};\n var powerPlantOnTheWeekend = new List<Person>() {homer};\n powerPlantOnTheWeekend.ShouldBeEmpty(); \n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n powerPlantOnTheWeekend\n should be empty\n but had 1 item and was [Homer]", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96d","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb985","createdAt":"2015-02-04T17:45:55.909Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":7,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldNotBeEmpty()\\n{\\n    var moesTavernOnTheWeekend = new List<Person>() {};\\n    moesTavernOnTheWeekend.ShouldNotBeEmpty(); \\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    moesTavernOnTheWeekend\\n            should not be empty\\n        but was \",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotbeempty","type":"basic","title":"ShouldNotBeEmpty","childrenPages":[]}

ShouldNotBeEmpty


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldNotBeEmpty()\n{\n var moesTavernOnTheWeekend = new List<Person>() {};\n moesTavernOnTheWeekend.ShouldNotBeEmpty(); \n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n moesTavernOnTheWeekend\n should not be empty\n but was ", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldNotBeEmpty()\n{\n var moesTavernOnTheWeekend = new List<Person>() {};\n moesTavernOnTheWeekend.ShouldNotBeEmpty(); \n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n moesTavernOnTheWeekend\n should not be empty\n but was ", "language": "text" } ], "sidebar": true } [/block]
{"__v":1,"_id":"54d902d6c263bf2d003bb986","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldBeOneOf()\\n{\\n    var moe  = new Person() { Name = \\\"Moe\\\"};\\n    var lenny = new Person() { Name = \\\"Lenny\\\"};\\n    var carl = new Person() { Name = \\\"carl\\\"};\\n    var stoneCutters = new List<Person>() { moe, lenny, carl };\\n    var clubOfNoHomers = new List<Person>() { moe, lenny, carl };\\n\\n    stoneCutters.ShouldBeOneOf(clubOfNoHomers);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n    stoneCutters\\n        should be one of\\n    [[Moe, Lenny, carl]]\\n        but was\\n    [Moe, Lenny, carl]\\n        difference\\n    [*Moe*, *Lenny*, *carl*]\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96d","createdAt":"2015-02-04T17:46:14.947Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":8,"project":"54cb556861698d0d00baf7a2","slug":"shouldbeoneof-1","sync_unique":"","title":"ShouldBeOneOf","type":"basic","updates":["552421951814c71900fd922b"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldBeOneOf


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldBeOneOf()\n{\n var moe = new Person() { Name = \"Moe\"};\n var lenny = new Person() { Name = \"Lenny\"};\n var carl = new Person() { Name = \"carl\"};\n var stoneCutters = new List<Person>() { moe, lenny, carl };\n var clubOfNoHomers = new List<Person>() { moe, lenny, carl };\n\n stoneCutters.ShouldBeOneOf(clubOfNoHomers);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n stoneCutters\n should be one of\n [[Moe, Lenny, carl]]\n but was\n [Moe, Lenny, carl]\n difference\n [*Moe*, *Lenny*, *carl*]", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldBeOneOf()\n{\n var moe = new Person() { Name = \"Moe\"};\n var lenny = new Person() { Name = \"Lenny\"};\n var carl = new Person() { Name = \"carl\"};\n var stoneCutters = new List<Person>() { moe, lenny, carl };\n var clubOfNoHomers = new List<Person>() { moe, lenny, carl };\n\n stoneCutters.ShouldBeOneOf(clubOfNoHomers);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n stoneCutters\n should be one of\n [[Moe, Lenny, carl]]\n but was\n [Moe, Lenny, carl]\n difference\n [*Moe*, *Lenny*, *carl*]", "language": "text" } ], "sidebar": true } [/block]
{"__v":1,"_id":"54d902d6c263bf2d003bb987","api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void IEnumerable_ShouldBeSubsetOf()\\n{\\n    var lisa  = new Person() { Name = \\\"Lisa\\\"};\\n    var bart = new Person() { Name = \\\"Bart\\\"};\\n    var maggie = new Person() { Name = \\\"Maggie\\\"};\\n    var homer = new Person() { Name = \\\"Homer\\\"};\\n    var marge = new Person() { Name = \\\"Marge\\\"};\\n    var ralph = new Person() { Name = \\\"Ralph\\\"};\\n    var simpsonsKids = new List<Person>() { bart, lisa, maggie, ralph };\\n    var simpsonsFamily = new List<Person>() {lisa, bart, maggie, homer, marge};\\n\\n    simpsonsKids.ShouldBeSubsetOf(simpsonsFamily);\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ShouldAssertException : \\n\\tsimpsonsKids \\n\\t\\tshould be subset of \\n\\t[Lisa, Bart, Maggie, Homer, Marge] \\n\\t\\tbut [Ralph] is outside subset\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb96d","createdAt":"2015-02-04T17:46:56.603Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":9,"project":"54cb556861698d0d00baf7a2","slug":"shouldbesubsetof","sync_unique":"","title":"ShouldBeSubsetOf","type":"basic","updates":["552422691814c71900fd922f"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldBeSubsetOf


[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldBeSubsetOf()\n{\n var lisa = new Person() { Name = \"Lisa\"};\n var bart = new Person() { Name = \"Bart\"};\n var maggie = new Person() { Name = \"Maggie\"};\n var homer = new Person() { Name = \"Homer\"};\n var marge = new Person() { Name = \"Marge\"};\n var ralph = new Person() { Name = \"Ralph\"};\n var simpsonsKids = new List<Person>() { bart, lisa, maggie, ralph };\n var simpsonsFamily = new List<Person>() {lisa, bart, maggie, homer, marge};\n\n simpsonsKids.ShouldBeSubsetOf(simpsonsFamily);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n\tsimpsonsKids \n\t\tshould be subset of \n\t[Lisa, Bart, Maggie, Homer, Marge] \n\t\tbut [Ralph] is outside subset", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void IEnumerable_ShouldBeSubsetOf()\n{\n var lisa = new Person() { Name = \"Lisa\"};\n var bart = new Person() { Name = \"Bart\"};\n var maggie = new Person() { Name = \"Maggie\"};\n var homer = new Person() { Name = \"Homer\"};\n var marge = new Person() { Name = \"Marge\"};\n var ralph = new Person() { Name = \"Ralph\"};\n var simpsonsKids = new List<Person>() { bart, lisa, maggie, ralph };\n var simpsonsFamily = new List<Person>() {lisa, bart, maggie, homer, marge};\n\n simpsonsKids.ShouldBeSubsetOf(simpsonsFamily);\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ShouldAssertException : \n\tsimpsonsKids \n\t\tshould be subset of \n\t[Lisa, Bart, Maggie, Homer, Marge] \n\t\tbut [Ralph] is outside subset", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb972","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb97e","createdAt":"2015-02-04T18:07:31.766Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldSatisfyAllConditions()\\n{\\n    var millionaire = new Person() { Name = \\\"Homer\\\", Salary = 30000 };\\n    millionaire.ShouldSatisfyAllConditions\\n        (\\n            () => millionaire.Name.ShouldBe(\\\"Mr.Burns\\\"),\\n            () => millionaire.Salary.ShouldBeGreaterThan(1000000)\\n        );\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n        millionaire should satisfy all the conditions specified, but does not.\\n        The following errors were found ...\\n--------------- Error 1 ---------------\\n\\n    millionaire.Name\\n        should be\\n    \\\"Mr.Burns\\\"\\n        but was\\n    \\\"Homer\\\"\\n\\n--------------- Error 2 ---------------\\n\\n    millionaire.Salary\\n        should be greater than\\n    1000000\\n        but was\\n    30000\\n\\n-----------------------------------------\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"It is a good practice to have only one assertion per test. But like they say 'To every rule, there is an exception'. Sometimes it might be neater to check for multiple things as part of a single test (null checking before asserting for example). Normally, if the first assertion fails, the test is terminated and the subsequent assertions are not evaluated. This might require multiple passes to fix each of the failing assertions. But by using the 'ShouldSatisfyAllConditions' method, all the assertions are evaluated at once and all failures displayed in one message, leading to quicker debugging.","slug":"shouldsatisfyallconditions","type":"basic","title":"ShouldSatisfyAllConditions","childrenPages":[]}

ShouldSatisfyAllConditions

It is a good practice to have only one assertion per test. But like they say 'To every rule, there is an exception'. Sometimes it might be neater to check for multiple things as part of a single test (null checking before asserting for example). Normally, if the first assertion fails, the test is terminated and the subsequent assertions are not evaluated. This might require multiple passes to fix each of the failing assertions. But by using the 'ShouldSatisfyAllConditions' method, all the assertions are evaluated at once and all failures displayed in one message, leading to quicker debugging.

[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldSatisfyAllConditions()\n{\n var millionaire = new Person() { Name = \"Homer\", Salary = 30000 };\n millionaire.ShouldSatisfyAllConditions\n (\n () => millionaire.Name.ShouldBe(\"Mr.Burns\"),\n () => millionaire.Salary.ShouldBeGreaterThan(1000000)\n );\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionaire should satisfy all the conditions specified, but does not.\n The following errors were found ...\n--------------- Error 1 ---------------\n\n millionaire.Name\n should be\n \"Mr.Burns\"\n but was\n \"Homer\"\n\n--------------- Error 2 ---------------\n\n millionaire.Salary\n should be greater than\n 1000000\n but was\n 30000\n\n-----------------------------------------", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldSatisfyAllConditions()\n{\n var millionaire = new Person() { Name = \"Homer\", Salary = 30000 };\n millionaire.ShouldSatisfyAllConditions\n (\n () => millionaire.Name.ShouldBe(\"Mr.Burns\"),\n () => millionaire.Salary.ShouldBeGreaterThan(1000000)\n );\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n millionaire should satisfy all the conditions specified, but does not.\n The following errors were found ...\n--------------- Error 1 ---------------\n\n millionaire.Name\n should be\n \"Mr.Burns\"\n but was\n \"Homer\"\n\n--------------- Error 2 ---------------\n\n millionaire.Salary\n should be greater than\n 1000000\n but was\n 30000\n\n-----------------------------------------", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb97d","createdAt":"2015-02-04T17:56:30.887Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldContainKey()\\n{\\n    var websters = new Dictionary<string, string>();\\n    websters.Add(\\\"Embiggen\\\", \\\"To empower or embolden.\\\");\\n    websters.ShouldContainKey(\\\"Cromulent\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\nDictionary\\n    \\\"websters\\\"\\nshould contain key\\n            \\\"Cromulent\\\"\\nbut does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldcontainkey","type":"basic","title":"ShouldContainKey","childrenPages":[]}

ShouldContainKey


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContainKey()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Embiggen\", \"To empower or embolden.\");\n websters.ShouldContainKey(\"Cromulent\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould contain key\n \"Cromulent\"\nbut does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContainKey()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Embiggen\", \"To empower or embolden.\");\n websters.ShouldContainKey(\"Cromulent\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould contain key\n \"Cromulent\"\nbut does not", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb974","createdAt":"2015-02-04T17:48:01.666Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotStartWith()\\n{\\n    var lenny = new Person() { Name = \\\"Carl\\\"};\\n    lenny.Name.ShouldNotStartWith(\\\"Car\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    lenny.Name\\n        should not start with\\n    \\\"Car\\\"\\n        but was\\n    \\\"Carl\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotstartwith","type":"basic","title":"ShouldNotStartWith","childrenPages":[]}

ShouldNotStartWith


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotStartWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldNotStartWith(\"Car\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should not start with\n \"Car\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotStartWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldNotStartWith(\"Car\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should not start with\n \"Car\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb975","createdAt":"2015-02-04T17:48:17.591Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":2,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldEndWith()\\n{\\n    var lenny = new Person() { Name = \\\"Carl\\\"};\\n    lenny.Name.ShouldEndWith(\\\"nny\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    lenny.Name\\n        should end with\\n    \\\"nny\\\"\\n        but was\\n    \\\"Carl\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldendwith","type":"basic","title":"ShouldEndWith","childrenPages":[]}

ShouldEndWith


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldEndWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldEndWith(\"nny\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should end with\n \"nny\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldEndWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldEndWith(\"nny\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should end with\n \"nny\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb976","createdAt":"2015-02-04T17:48:37.331Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":3,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotEndWith()\\n{\\n    var lenny = new Person() { Name = \\\"Carl\\\"};\\n    lenny.Name.ShouldNotEndWith(\\\"arl\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    lenny.Name\\n        should not end with\\n    \\\"arl\\\"\\n        but was\\n    \\\"Carl\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotendwith","type":"basic","title":"ShouldNotEndWith","childrenPages":[]}

ShouldNotEndWith


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotEndWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldNotEndWith(\"arl\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should not end with\n \"arl\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotEndWith()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldNotEndWith(\"arl\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should not end with\n \"arl\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb977","createdAt":"2015-02-04T17:48:53.791Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":4,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldContain()\\n{\\n    var lenny = new Person() { Name = \\\"Carl\\\"};\\n    lenny.Name.ShouldContain(\\\"enn\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    lenny.Name\\n        should contain\\n    \\\"enn\\\"\\n        but was\\n    \\\"Carl\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldcontain-1","type":"basic","title":"ShouldContain","childrenPages":[]}

ShouldContain


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContain()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldContain(\"enn\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should contain\n \"enn\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContain()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldContain(\"enn\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should contain\n \"enn\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb978","createdAt":"2015-02-04T17:49:18.812Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":5,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotContain()\\n{\\n    var lenny = new Person() { Name = \\\"Carl\\\"};\\n    lenny.Name.ShouldNotContain(\\\"ar\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    lenny.Name\\n        should not contain\\n    \\\"ar\\\"\\n        but was\\n    \\\"Carl\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotcontain-1","type":"basic","title":"ShouldNotContain","childrenPages":[]}

ShouldNotContain


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotContain()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldNotContain(\"ar\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should not contain\n \"ar\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotContain()\n{\n var lenny = new Person() { Name = \"Carl\"};\n lenny.Name.ShouldNotContain(\"ar\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n lenny.Name\n should not contain\n \"ar\"\n but was\n \"Carl\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb979","createdAt":"2015-02-04T17:49:39.052Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":6,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldContainWithoutWhitespace()\\n{\\n    var simpsonDog = new Dog() { Name = \\\"SantasLittleHelperS\\\"};\\n    simpsonDog.Name.ShouldContainWithoutWhitespace(\\\"Santas Little Helper\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    simpsonDog.Name\\n        should contain without whitespace\\n    \\\"Santas Little Helper\\\"\\n        but was\\n    \\\"SantasLittleHelperS\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldcontainwithoutwhitespace","type":"basic","title":"ShouldContainWithoutWhitespace","childrenPages":[]}

ShouldContainWithoutWhitespace


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContainWithoutWhitespace()\n{\n var simpsonDog = new Dog() { Name = \"SantasLittleHelperS\"};\n simpsonDog.Name.ShouldContainWithoutWhitespace(\"Santas Little Helper\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n simpsonDog.Name\n should contain without whitespace\n \"Santas Little Helper\"\n but was\n \"SantasLittleHelperS\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContainWithoutWhitespace()\n{\n var simpsonDog = new Dog() { Name = \"SantasLittleHelperS\"};\n simpsonDog.Name.ShouldContainWithoutWhitespace(\"Santas Little Helper\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n simpsonDog.Name\n should contain without whitespace\n \"Santas Little Helper\"\n but was\n \"SantasLittleHelperS\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb97a","createdAt":"2015-02-04T17:55:32.777Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":7,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldMatch()\\n{\\n  \\tvar simpsonDog = new Dog() { Name = \\\"Santas little helper\\\" };\\n    simpsonDog.Name.ShouldMatch(\\\"Santas [lL]ittle Helper\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    simpsonDog.Name\\n        should match\\n    \\\"Santas [lL]ittle Helper\\\"\\n        but was\\n    \\\"Santas little helper\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Matches a Regular expression","slug":"shouldmatch","type":"basic","title":"ShouldMatch","childrenPages":[]}

ShouldMatch

Matches a Regular expression

[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldMatch()\n{\n \tvar simpsonDog = new Dog() { Name = \"Santas little helper\" };\n simpsonDog.Name.ShouldMatch(\"Santas [lL]ittle Helper\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n simpsonDog.Name\n should match\n \"Santas [lL]ittle Helper\"\n but was\n \"Santas little helper\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldMatch()\n{\n \tvar simpsonDog = new Dog() { Name = \"Santas little helper\" };\n simpsonDog.Name.ShouldMatch(\"Santas [lL]ittle Helper\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n simpsonDog.Name\n should match\n \"Santas [lL]ittle Helper\"\n but was\n \"Santas little helper\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb97b","createdAt":"2015-02-04T17:55:53.789Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":8,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldBeNullOrEmpty()\\n{\\n    var anonymousClanOfSlackJawedTroglodytes = new Person() {Name = \\\"The Simpsons\\\"};\\n    anonymousClanOfSlackJawedTroglodytes.Name.ShouldBeNullOrEmpty();\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    anonymousClanOfSlackJawedTroglodytes.Name\\n            should be null or empty\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldbenullorempty","type":"basic","title":"ShouldBeNullOrEmpty","childrenPages":[]}

ShouldBeNullOrEmpty


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeNullOrEmpty()\n{\n var anonymousClanOfSlackJawedTroglodytes = new Person() {Name = \"The Simpsons\"};\n anonymousClanOfSlackJawedTroglodytes.Name.ShouldBeNullOrEmpty();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n anonymousClanOfSlackJawedTroglodytes.Name\n should be null or empty", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldBeNullOrEmpty()\n{\n var anonymousClanOfSlackJawedTroglodytes = new Person() {Name = \"The Simpsons\"};\n anonymousClanOfSlackJawedTroglodytes.Name.ShouldBeNullOrEmpty();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n anonymousClanOfSlackJawedTroglodytes.Name\n should be null or empty", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96e","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb97c","createdAt":"2015-02-04T17:56:14.170Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":9,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotBeNullOrEmpty()\\n{\\n    var troyMcClure = new Person() {};\\n    troyMcClure.Name.ShouldNotBeNullOrEmpty();\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    troyMcClure.Name\\n            should not be null or empty\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotbenullorempty","type":"basic","title":"ShouldNotBeNullOrEmpty","childrenPages":[]}

ShouldNotBeNullOrEmpty


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotBeNullOrEmpty()\n{\n var troyMcClure = new Person() {};\n troyMcClure.Name.ShouldNotBeNullOrEmpty();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n troyMcClure.Name\n should not be null or empty", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotBeNullOrEmpty()\n{\n var troyMcClure = new Person() {};\n troyMcClure.Name.ShouldNotBeNullOrEmpty();\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n troyMcClure.Name\n should not be null or empty", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96f","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb98f","createdAt":"2015-02-04T17:59:26.424Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldThrow()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var denominator = 1;\\n    Should.Throw<DivideByZeroException>(() => { \\n                                                var y = homer.Salary/denominator;\\n                                              });\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    Should\\n        throw \\n    System.DivideByZeroException\\n        but does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldthrow","type":"basic","title":"ShouldThrow","childrenPages":[]}

ShouldThrow


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldThrow()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 1;\n Should.Throw<DivideByZeroException>(() => { \n var y = homer.Salary/denominator;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n throw \n System.DivideByZeroException\n but does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldThrow()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 1;\n Should.Throw<DivideByZeroException>(() => { \n var y = homer.Salary/denominator;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n throw \n System.DivideByZeroException\n but does not", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96f","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb98d","createdAt":"2015-02-04T17:57:49.950Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotContainKey()\\n{\\n    var websters = new Dictionary<string, string>();\\n    websters.Add(\\\"Chazzwazzers\\\", \\\"What Australians would have called a bull frog.\\\");\\n\\n    websters.ShouldNotContainKey(\\\"Chazzwazzers\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\nDictionary\\n    \\\"websters\\\"\\nshould not contain key\\n            \\\"Chazzwazzers\\\"\\nbut does\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotcontainkey","type":"basic","title":"ShouldNotContainKey","childrenPages":[]}

ShouldNotContainKey


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotContainKey()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Chazzwazzers\", \"What Australians would have called a bull frog.\");\n\n websters.ShouldNotContainKey(\"Chazzwazzers\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould not contain key\n \"Chazzwazzers\"\nbut does", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotContainKey()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Chazzwazzers\", \"What Australians would have called a bull frog.\");\n\n websters.ShouldNotContainKey(\"Chazzwazzers\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould not contain key\n \"Chazzwazzers\"\nbut does", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96f","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb98c","createdAt":"2015-02-04T17:57:28.084Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":2,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldContainKeyAndValue()\\n{\\n    var websters = new Dictionary<string, string>();\\n    websters.Add(\\\"Cromulent\\\", \\\"I never heard the word before moving to Springfield.\\\");\\n\\n    websters.ShouldContainKeyAndValue(\\\"Cromulent\\\", \\\"Fine, acceptable.\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\nDictionary\\n    \\\"websters\\\"\\nshould contain key\\n\\\"Cromulent\\\"\\nwith value\\n            \\\"Fine, acceptable.\\\"\\nbut value was \\\"I never heard the word before moving to Springfield.\\\"\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldcontainkeyandvalue","type":"basic","title":"ShouldContainKeyAndValue","childrenPages":[]}

ShouldContainKeyAndValue


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContainKeyAndValue()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Cromulent\", \"I never heard the word before moving to Springfield.\");\n\n websters.ShouldContainKeyAndValue(\"Cromulent\", \"Fine, acceptable.\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould contain key\n\"Cromulent\"\nwith value\n \"Fine, acceptable.\"\nbut value was \"I never heard the word before moving to Springfield.\"", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldContainKeyAndValue()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Cromulent\", \"I never heard the word before moving to Springfield.\");\n\n websters.ShouldContainKeyAndValue(\"Cromulent\", \"Fine, acceptable.\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould contain key\n\"Cromulent\"\nwith value\n \"Fine, acceptable.\"\nbut value was \"I never heard the word before moving to Springfield.\"", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb96f","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb98e","createdAt":"2015-02-04T17:58:19.467Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":3,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotContainValueForKey()\\n{\\n    var websters = new Dictionary<string, string>();\\n    websters.Add(\\\"Chazzwazzers\\\", \\\"What Australians would have called a bull frog.\\\");\\n\\n    websters.ShouldNotContainValueForKey(\\\"Chazzwazzers\\\", \\\"What Australians would have called a bull frog.\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\nDictionary\\n    \\\"websters\\\"\\nshould not contain key\\n\\\"Chazzwazzers\\\"\\nwith value\\n            \\\"What Australians would have called a bull frog.\\\"\\nbut does\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldnotcontainvalueforkey","type":"basic","title":"ShouldNotContainValueForKey","childrenPages":[]}

ShouldNotContainValueForKey


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotContainValueForKey()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Chazzwazzers\", \"What Australians would have called a bull frog.\");\n\n websters.ShouldNotContainValueForKey(\"Chazzwazzers\", \"What Australians would have called a bull frog.\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould not contain key\n\"Chazzwazzers\"\nwith value\n \"What Australians would have called a bull frog.\"\nbut does", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotContainValueForKey()\n{\n var websters = new Dictionary<string, string>();\n websters.Add(\"Chazzwazzers\", \"What Australians would have called a bull frog.\");\n\n websters.ShouldNotContainValueForKey(\"Chazzwazzers\", \"What Australians would have called a bull frog.\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \nDictionary\n \"websters\"\nshould not contain key\n\"Chazzwazzers\"\nwith value\n \"What Australians would have called a bull frog.\"\nbut does", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb971","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb989","createdAt":"2015-02-04T18:03:05.330Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldThrowFuncOfTask()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var denominator = 1;\\n    Should.Throw<DivideByZeroException>(() =>\\n    {\\n        var task = Task.Factory.StartNew(() => { var y = homer.Salary/denominator; });\\n        return task;\\n    });\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    Should\\n        throw \\n    System.DivideByZeroException\\n        but does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldthrow-2","type":"basic","title":"ShouldThrow","childrenPages":[]}

ShouldThrow


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldThrowFuncOfTask()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 1;\n Should.Throw<DivideByZeroException>(() =>\n {\n var task = Task.Factory.StartNew(() => { var y = homer.Salary/denominator; });\n return task;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n throw \n System.DivideByZeroException\n but does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldThrowFuncOfTask()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 1;\n Should.Throw<DivideByZeroException>(() =>\n {\n var task = Task.Factory.StartNew(() => { var y = homer.Salary/denominator; });\n return task;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n throw \n System.DivideByZeroException\n but does not", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb971","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb98b","createdAt":"2015-02-04T18:04:50.213Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":0,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void DynamicShouldHavePropertyTest()\\n{\\n    var homerThinkingLikeFlanders = new ExpandoObject();\\n    DynamicShould.HaveProperty(homerThinkingLikeFlanders, \\\"IAmABigFourEyedLameO\\\");\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    Dynamic Object\\n        \\\"homerThinkingLikeFlanders\\\"\\n    should contain property\\n                 \\\"IAmABigFourEyedLameO\\\"\\n        but does not.\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"shouldhaveproperty","type":"basic","title":"ShouldHaveProperty","childrenPages":[]}

ShouldHaveProperty


[block:code] { "codes": [ { "code": "[Test]\npublic void DynamicShouldHavePropertyTest()\n{\n var homerThinkingLikeFlanders = new ExpandoObject();\n DynamicShould.HaveProperty(homerThinkingLikeFlanders, \"IAmABigFourEyedLameO\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Dynamic Object\n \"homerThinkingLikeFlanders\"\n should contain property\n \"IAmABigFourEyedLameO\"\n but does not.", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void DynamicShouldHavePropertyTest()\n{\n var homerThinkingLikeFlanders = new ExpandoObject();\n DynamicShould.HaveProperty(homerThinkingLikeFlanders, \"IAmABigFourEyedLameO\");\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Dynamic Object\n \"homerThinkingLikeFlanders\"\n should contain property\n \"IAmABigFourEyedLameO\"\n but does not.", "language": "text" } ], "sidebar": true } [/block]
{"version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb971","__v":0,"project":"54cb556861698d0d00baf7a2","user":"54c4ca1473b3db0d001a7571","updates":[],"_id":"54d902d6c263bf2d003bb98a","createdAt":"2015-02-04T18:03:39.719Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":2,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void CompleteIn()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000 };\\n    var denominator = 1;\\n    Should.CompleteIn(() =>\\n    {\\n        Thread.Sleep(2000);\\n        var y = homer.Salary / denominator;\\n    }, TimeSpan.FromSeconds(1));\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"System.TimeoutException : The operation has timed out.\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"completein","type":"basic","title":"CompleteIn","childrenPages":[]}

CompleteIn


[block:code] { "codes": [ { "code": "[Test]\npublic void CompleteIn()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000 };\n var denominator = 1;\n Should.CompleteIn(() =>\n {\n Thread.Sleep(2000);\n var y = homer.Salary / denominator;\n }, TimeSpan.FromSeconds(1));\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "System.TimeoutException : The operation has timed out.", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void CompleteIn()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000 };\n var denominator = 1;\n Should.CompleteIn(() =>\n {\n Thread.Sleep(2000);\n var y = homer.Salary / denominator;\n }, TimeSpan.FromSeconds(1));\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "System.TimeoutException : The operation has timed out.", "language": "text" } ], "sidebar": true } [/block]
{"__v":3,"_id":"54d902d6c263bf2d003bb99d","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldThrow()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var denominator = 10;\\n    Should.Throw<DivideByZeroException>(() => { \\n        var y = homer.Salary/denominator;\\n    });\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    Should\\n        throw \\n    System.DivideByZeroException\\n        but does not\",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb970","createdAt":"2015-02-04T17:59:53.069Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":1,"project":"54cb556861698d0d00baf7a2","slug":"shouldnotthrow","sync_unique":"","title":"ShouldThrow","type":"basic","updates":["54de76c9c4a3570d009d4a25","56d5ef8fb939870b00512ba8"],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldThrow


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldThrow()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 10;\n Should.Throw<DivideByZeroException>(() => { \n var y = homer.Salary/denominator;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n throw \n System.DivideByZeroException\n but does not", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldThrow()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 10;\n Should.Throw<DivideByZeroException>(() => { \n var y = homer.Salary/denominator;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n throw \n System.DivideByZeroException\n but does not", "language": "text" } ], "sidebar": true } [/block]
{"__v":1,"_id":"54d902d6c263bf2d003bb99e","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"url":""},"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotThrow()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var denominator = 0;\\n    Should.NotThrow(() =>\\n    {\\n        var y = homer.Salary/denominator;\\n    });\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    Should\\n        not throw \\n    System.DivideByZeroException\\n        but does \",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","category":"54d902d5c263bf2d003bb970","createdAt":"2015-02-04T18:02:12.670Z","excerpt":"","githubsync":"","hidden":false,"link_external":false,"link_url":"","order":1,"project":"54cb556861698d0d00baf7a2","slug":"shouldthrow-1","sync_unique":"","title":"ShouldNotThrow","type":"basic","updates":[],"user":"54c4ca1473b3db0d001a7571","version":"54d902d4c263bf2d003bb96a","childrenPages":[]}

ShouldNotThrow


[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotThrow()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 0;\n Should.NotThrow(() =>\n {\n var y = homer.Salary/denominator;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n not throw \n System.DivideByZeroException\n but does ", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotThrow()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 0;\n Should.NotThrow(() =>\n {\n var y = homer.Salary/denominator;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n not throw \n System.DivideByZeroException\n but does ", "language": "text" } ], "sidebar": true } [/block]
{"project":"54cb556861698d0d00baf7a2","version":"54d902d4c263bf2d003bb96a","category":"54d902d5c263bf2d003bb970","_id":"550a7abf635c660d005280a1","user":"54c4ca1473b3db0d001a7571","updates":[],"createdAt":"2015-03-19T07:29:03.832Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"order":999,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[Test]\\npublic void ShouldNotThrowFuncOfTask()\\n{\\n    var homer = new Person() { Name = \\\"Homer\\\", Salary = 30000};\\n    var denominator = 0;\\n    Should.NotThrow(() =>\\n    {\\n        var task = Task.Factory.StartNew(() => { var y = homer.Salary/denominator; });\\n        return task;\\n    });\\n}\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Failure Message\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Shouldly.ChuckedAWobbly : \\n    Should\\n        not throw \\n    System.DivideByZeroException\\n        but does \",\n      \"language\": \"text\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"This overload supports asynchronous methods and will wait for the operation to finish.","slug":"shouldnotthrowfunctask","type":"basic","title":"ShouldNotThrow(Func<Task>)","__v":0,"childrenPages":[]}

ShouldNotThrow(Func<Task>)

This overload supports asynchronous methods and will wait for the operation to finish.

[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotThrowFuncOfTask()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 0;\n Should.NotThrow(() =>\n {\n var task = Task.Factory.StartNew(() => { var y = homer.Salary/denominator; });\n return task;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n not throw \n System.DivideByZeroException\n but does ", "language": "text" } ], "sidebar": true } [/block]
[block:code] { "codes": [ { "code": "[Test]\npublic void ShouldNotThrowFuncOfTask()\n{\n var homer = new Person() { Name = \"Homer\", Salary = 30000};\n var denominator = 0;\n Should.NotThrow(() =>\n {\n var task = Task.Factory.StartNew(() => { var y = homer.Salary/denominator; });\n return task;\n });\n}", "language": "csharp" } ] } [/block] [block:api-header] { "type": "basic", "title": "Failure Message", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "Shouldly.ChuckedAWobbly : \n Should\n not throw \n System.DivideByZeroException\n but does ", "language": "text" } ], "sidebar": true } [/block]