Skip to content

Instantly share code, notes, and snippets.

View davetheninja's full-sized avatar

Dave the Ninja davetheninja

  • me, myself and I
  • Hong Kong
View GitHub Profile
FAO Up-the-Duffy
public class PlayerViewModel
{
public string FirstName {get;set;}
public string LastName {get;set;}
}
----------------------------------------------
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;}
[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() });
[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>();
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 = () =>
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;
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";
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")) { }
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);
[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);