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
FAO Up-the-Duffy | |
public class PlayerViewModel | |
{ | |
public string FirstName {get;set;} | |
public string LastName {get;set;} | |
} | |
---------------------------------------------- |
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
This has been written in notepad Mr Duffy, forgive me for any compilation errors hahaha | |
public class Flash | |
{ | |
public void Flash(string message, FlashPriority priority) | |
{ | |
Message = message; | |
Priority = priority; | |
} | |
public string Message {get; private set;} |
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(ManagementController), "user management")] | |
public class when_viewing_a_list_of_all_users : as_controller<ManagementController, ViewResult> | |
{ | |
Establish context = () => | |
{ | |
new AutoMapperBootPart().Execute(null); | |
_repository = MockRepository.GenerateStub<IRepository>(); | |
_repository.Expect(a => a.QueryList(Arg<GetAllUsersForManagementListQuery>.Is.Anything)).Return(new List<User> { new User(), new User() }); |
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
[TestFixture, Category("Email")] | |
public class When_sending_an_email_message : Specification | |
{ | |
private EmailSender _emailSender; | |
private ISmtpServer _smtpServer; | |
private IBuildEmailBodies _emailBodyLoader; | |
public override void Given() | |
{ | |
_smtpServer = CreateStub<ISmtpServer>(); |
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.Web.Mvc; | |
using Core.Web; | |
using Machine.Specifications; | |
namespace Core.Specs.Web | |
{ | |
[Subject(typeof(TempDataExtensions))] | |
public class when_setting_success_flash | |
{ | |
Establish context = () => |
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 GoogleAccountQuery : IGoogleAccountQuery | |
{ | |
readonly string _email; | |
readonly string _password; | |
readonly string _applicationName; | |
public GoogleAccountQuery(string email, string password, string applicationName) | |
{ | |
_email = email; | |
_password = password; |
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.IO; | |
using System.Linq; | |
using System.Net; | |
namespace Core | |
{ | |
public class GoogleTokenQuery | |
{ | |
const string AuthenticationUrlFormat = "accountType=GOOGLE&Email={0}&Passwd={1}&source=davetheninja.net&service=analytics"; |
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 Castle.Windsor; | |
using Castle.Windsor.Configuration; | |
using Castle.Windsor.Configuration.Interpreters; | |
using Core.Castle.Installers; | |
namespace Core.Castle | |
{ | |
public class IoCContainer : WindsorContainer | |
{ | |
public IoCContainer() : this(new XmlInterpreter("windsor.config.xml")) { } |
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 FluentNHibernateFacility : NHibernateFacility | |
{ | |
protected override void Init() | |
{ | |
var connectionString = FacilityConfig.Attributes["connection_string"]; | |
if (string.IsNullOrEmpty(connectionString)) | |
throw new ConfigurationErrorsException("No connection string has been supplied. Please supply a connection string."); | |
var factoryConfig = BuildFactory(connectionString); |
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
[TestFixture] | |
public class FooBar : as_sql_server_integration_test | |
{ | |
[Test] | |
public void LoadingFromGoogleTest() | |
{ | |
IEnumerable<string> metrics; | |
IEnumerable<string> dimensions; | |
var data = GetAnalyticsData(out metrics, out dimensions); |
OlderNewer