This file contains hidden or 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 When_loading_the_vehicle_list_and_there_two_available_vehicles : Specification | |
{ | |
protected Mock<IVehicleRepository> _vehicleRepository; | |
protected List<Vehicle> _vehicles; | |
protected VehicleViewModel _vehicleViewModel; | |
protected override void before_each() | |
{ |
This file contains hidden or 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
require 'rubygems' | |
require 'sinatra' | |
require 'sinatra/base' | |
require 'my_trip/app' | |
require 'rack/test' | |
require 'rspec' | |
require 'mongoid' | |
set :environment, :test | |
set :run, false |
This file contains hidden or 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
describe PersonTest, "when testing an isolation" do | |
before :each do | |
@isolation = Isolation.for IPerson | |
@pt = PersonTest.new(@isolation) | |
@pt.set_person_age_to_twenty | |
end | |
it "should have the age set to 20" do | |
@pt.person.age.should be(20) | |
end |
This file contains hidden or 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 CODODN | |
{ | |
public interface IRepository | |
{ | |
string SomethingYouNeed { get; set; } |
This file contains hidden or 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
desc "Build TicTacToe using the MSBuildTask" | |
msbuild :msbuild do |msb| | |
msb.properties :configuration => :Release | |
msb.targets :Clean, :Build | |
#msb.verbosity :verbosity => 'q' | |
msb.solution = "../TicTacToe.sln" | |
end |
This file contains hidden or 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.Diagnostics; | |
using System.Reflection; | |
using NUnit.Framework; | |
using Rhino.Mocks; | |
using Rhino.Mocks.Impl; | |
using Rhino.Mocks.Interfaces; | |
using StructureMap.AutoMocking; | |
namespace ExpressSpringBreak.Web.Tests |
This file contains hidden or 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 RepositoryConventionScanner : IRegistrationConvention | |
{ | |
public void Process(Type type, Registry registry) | |
{ | |
Type repoForType = GetGenericParamFor(type.BaseType, typeof(Repository<>)); | |
if (repoForType != null) | |
{ | |
var genType = typeof(IRepository<>).MakeGenericType(repoForType); | |
registry.For(genType).Add(typeof (Repository<>)); |
This file contains hidden or 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 interface IPhotoRepository : IRepository<Photo> | |
{ | |
IList<Photo> GetPhotosByGallery(Gallery gallery); | |
} | |
public class PhotoRepository : Repository<Photo>, IPhotoRepository | |
{ | |
public PhotoRepository(ISession session) : base(session) |
This file contains hidden or 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.Configuration; | |
using FluentNHibernate; | |
using FluentNHibernate.Cfg; | |
using FluentNHibernate.Cfg.Db; | |
using StructureMap; | |
public static class Bootstrapper | |
{ |
This file contains hidden or 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
[Oo]bj | |
[Bb]in | |
*.user | |
*.suo | |
*.[Cc]ache | |
*.bak | |
*.ncb | |
*.log | |
*.DS_Store | |
[Tt]humbs.db |
NewerOlder