public void IWantToRegisterANewUserC() { //Demonstrates inline naming and renaming through test var user = new WebUser(); ICustomer newCustomer = new Customer("*****@*****.**"); SoThat(MyBusinessValue.WeIncreaseTheCustomerBase) .As(user.Named("The user")) .Given(newCustomer.Named("customer for the first time").Register) .When(newCustomer.Named("via email customer").Confirm_Registration) .Then(newCustomer.Named("returning customer").Login); }
public void IWantToRegisterANewUserB() { //Demonstrates more descriptive naming of personas and entities var user = new WebUser().Named("a web user"); //naming by hand ICustomer newCustomer = new Customer("*****@*****.**"); newCustomer.Named(() => newCustomer); //naming from variable name SoThat(MyBusinessValue.WeIncreaseTheCustomerBase) .As(user) .Given(newCustomer.Register) .When(newCustomer.Confirm_Registration) .Then(newCustomer.Login); }