This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace When | |
{ | |
[Subject(typeof())] | |
public class Figuring_out_mSpec | |
{ | |
It should_be_unspeced_here; | |
It should_fail_here_too = () => | |
returnFalse().ShouldBeFalse(); // ShouldBeFalse is an extension method in mspec. | |
It should_pass_here = () => | |
s.Contains("o").ShouldBeTrue(); // ShouldBeTrue is an extension method in mspec. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace EnumTest | |
{ | |
public enum MyEnum | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Subject(typeof(ContentPage))] | |
public class Creating_a_ContentPage | |
{ | |
Establish context = () => | |
{ | |
mocker = new RhinoAutoMocker<ContentPageController>(); | |
contentPageController = mocker.ClassUnderTest; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Index() | |
{ | |
var meh = | |
_meh.GetMeh(contentpageId); | |
var blah = something.GetValueOrDefault() ? | |
something.Something : something.Something.Where(s => s.SomethingElse); | |
var aTruth = _wibble.IsThisTrue(whee); | |
var arghh = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutoMockingContext<TUnderTest> where TUnderTest : class | |
{ | |
protected static MoqAutoMocker<TUnderTest> autoMocker; | |
Establish automocking = () => autoMocker = new MoqAutoMocker<TUnderTest>(); | |
protected static Mock<TInterface> Stub<TInterface>() where TInterface : class |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// some codez | |
if ( ctrl is CheckBox) | |
{ | |
AddToDictionary(ctrl); | |
} | |
if ( ctrl is RadioBox) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
writer.Write( | |
string.Format("{0}:", | |
_meaningfulNameService.WellNamedMethod( | |
wellnamedType == WellNamedType.WellNameProperty && | |
(goodname.wellnamedProperty == "Something" || | |
goodname.wellnamedProperty == "Somethingelse") | |
? "Total" | |
: (goodname.wellnamedProperty != "Something" && | |
goodname.wellnamedProperty != "SomethingElse") | |
? string.Format("Total for <br/>{0} to {1}", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi John, | |
Please try to use the [email protected] address responsibly, i.e. to send emails that actually concern an appreciable proportion of the postgrad population within the school. This isn't really the place to bitch about 3rd party websites like bcs.org (perhaps you can find a relevant newsgroup, message board or IRC channel in which to discuss their website). | |
Furthermore, if spam is causing a problem for you, I will be happy to suggest some basic steps you can take to filter it out of your inbox. Many computer science postgrads have a computer-oriented background, and therefore are familiar with solutions that prevent '75% spam' from cluttering their inboxes. If, rather, you object to the idea of there being spam emails sent to your address in the first place, you could take your concerns directly to Duty Office. | |
Hope this helps, | |
Richard | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: | |
(Constraint) | |
In order to track the author of documentation and comments | |
I need to provide a way to identify users | |
Scenario: An anonymous user requests an iDoc identity with valid details | |
Given I am not identified | |
When I go to the new account page | |
And I enter the required account details | |
And I press "Register" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace iDoc.specs.When | |
{ | |
[Subject("AcccountManagement")] | |
public class CreatingAUserAccount : BaseContext<AccountController> | |
{ | |
const string EmailAddress = @"[email protected]"; | |
Establish context = () => | |
{ |
OlderNewer