public void Setup()
 {
     _mockery            = new MockRepository( );
     _mockGateway        = _mockery.DynamicMock <IDatabaseGateway>( );
     _boatMapper         = _mockery.DynamicMock <IBoatDataMapper>( );
     _leaseDataMapper    = _mockery.DynamicMock <ILeaseDataMapper>( );
     _registrationMapper = _mockery.DynamicMock <IRegistrationDataMapper>( );
 }
Beispiel #2
0
 public CustomerDataMapper(IDatabaseGateway gateway, IBoatDataMapper boatMapper, ILeaseDataMapper leaseMapper,
                           IRegistrationDataMapper registrationMapper)
 {
     _gateway            = gateway;
     _boatMapper         = boatMapper;
     _leaseMapper        = leaseMapper;
     _registrationMapper = registrationMapper;
 }
Beispiel #3
0
        public void Should_be_able_to_insert_new_leases_for_customer()
        {
            long customerId = CustomerMother.CreateCustomerRecord( );

            IList <ISlipLease> leases = new List <ISlipLease>( );

            leases.Add(new SlipLease(new Slip(1000, null, 100, 100, true), LeaseDurations.Daily));

            ILeaseDataMapper mapper = CreateSUT( );

            mapper.Insert(leases, customerId);

            IRichList <ISlipLease> foundLeases = ListFactory.From(mapper.AllLeasesFor(customerId));

            Assert.AreEqual(1, foundLeases.Count);
        }
Beispiel #4
0
 public DatabaseRowToSlipMapper(ILeaseDataMapper leaseDataMapper)
 {
     this.leaseDataMapper = leaseDataMapper;
 }