Commit bba641e

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-03-14 01:05:07
refactoring to explicit repository interfaces.
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@75 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 01c3d45
trunk/product/MyMoney/Domain/Core/IRepository.cs → trunk/product/MyMoney/DataAccess/core/IDatabaseGateway.cs
@@ -1,9 +1,10 @@
 using System.Collections.Generic;
+using MoMoney.Domain.Core;
 using MoMoney.Infrastructure.Logging;
 
-namespace MoMoney.Domain.Core
+namespace MoMoney.DataAccess.core
 {
-    public interface IRepository : ILoggable
+    public interface IDatabaseGateway : ILoggable
     {
         IEnumerable<T> all<T>() where T : IEntity;
         void save<T>(T item) where T : IEntity;
trunk/product/MyMoney/DataAccess/db40/spiking/db40_spike_specs.cs
@@ -10,7 +10,7 @@ using MoMoney.Utility.Extensions;
 namespace MoMoney.DataAccess.db40.spiking
 {
     [Concern(typeof (Db4oFactory))]
-    public class when_opening_an_existing_database_ : concerns_for
+    public class when_opening_an_existing_database_ : concerns
     {
         before_each_observation be = () => { };
 
trunk/product/MyMoney/DataAccess/db40/ObjectRepository.cs → trunk/product/MyMoney/DataAccess/db40/ObjectDatabaseGateway.cs
@@ -1,17 +1,18 @@
 using System.Collections.Generic;
 using System.Linq;
 using Db4objects.Db4o;
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.Core;
 using MoMoney.Infrastructure.Extensions;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.DataAccess.db40
 {
-    public class ObjectRepository : IRepository
+    public class ObjectDatabaseGateway : IDatabaseGateway
     {
         readonly ISessionFactory factory;
 
-        public ObjectRepository(ISessionFactory factory)
+        public ObjectDatabaseGateway(ISessionFactory factory)
         {
             this.factory = factory;
         }
trunk/product/MyMoney/DataAccess/db40/ObjectRepositorySpecs.cs → trunk/product/MyMoney/DataAccess/db40/ObjectDatabaseGatewaySpecs.cs
@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using Db4objects.Db4o;
 using developwithpassion.bdd.contexts;
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.Core;
 using MoMoney.Testing.MetaData;
 using MoMoney.Testing.spechelpers.contexts;
@@ -8,17 +9,12 @@ using MoMoney.Testing.spechelpers.core;
 
 namespace MoMoney.DataAccess.db40
 {
-    [Concern(typeof (ObjectRepository))]
-    public abstract class behaves_like_a_object_repository : concerns_for<IRepository, ObjectRepository>
+    [Concern(typeof (ObjectDatabaseGateway))]
+    public abstract class behaves_like_a_object_repository : concerns_for<IDatabaseGateway, ObjectDatabaseGateway>
     {
-        //public override IRepository create_sut()
-        //{
-        //    return new ObjectRepository(factory);
-        //}
-
         context c = () => { factory = the_dependency<ISessionFactory>(); };
 
-        static protected ISessionFactory factory;
+        protected static ISessionFactory factory;
     }
 
     public class when_loading_all_the_items_from_the_database : behaves_like_a_object_repository
trunk/product/MyMoney/DataAccess/repositories/BillRepository.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+using MoMoney.DataAccess.core;
+using MoMoney.Domain.accounting.billing;
+using MoMoney.Domain.repositories;
+
+namespace MoMoney.DataAccess.repositories
+{
+    public class BillRepository : IBillRepository
+    {
+        IDatabaseGateway gateway;
+
+        public BillRepository(IDatabaseGateway gateway)
+        {
+            this.gateway = gateway;
+        }
+
+        public IEnumerable<IBill> all()
+        {
+            return gateway.all<IBill>();
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/DataAccess/repositories/CompanyRepository.cs
@@ -0,0 +1,31 @@
+using System.Collections.Generic;
+using System.Linq;
+using MoMoney.DataAccess.core;
+using MoMoney.Domain.accounting.billing;
+using MoMoney.Domain.repositories;
+using MoMoney.Utility.Extensions;
+
+namespace MoMoney.DataAccess.repositories
+{
+    public class CompanyRepository : ICompanyRepository
+    {
+        IDatabaseGateway gateway;
+
+        public CompanyRepository(IDatabaseGateway gateway)
+        {
+            this.gateway = gateway;
+        }
+
+        public IEnumerable<ICompany> all()
+        {
+            return gateway.all<ICompany>();
+        }
+
+        public ICompany find_company_named(string name)
+        {
+            return gateway
+                .all<ICompany>()
+                .SingleOrDefault(x => x.name.is_equal_to_ignoring_case(name));
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/DataAccess/sqlcompact/sql_compant_repository_specs.cs
@@ -1,5 +0,0 @@
-namespace MoMoney.DataAccess.sqlcompact
-{
-    public class sql_compant_repository_specs
-    {}
-}
\ No newline at end of file
trunk/product/MyMoney/Domain/Core/money_extensions.cs → trunk/product/MyMoney/Domain/Core/MoneyExtensions.cs
@@ -2,7 +2,7 @@ using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Domain.Core
 {
-    public static class money_extensions
+    public static class MoneyExtensions
     {
         public static IMoney as_money(this double amount)
         {
trunk/product/MyMoney/Domain/Core/money_extensions_specs.cs → trunk/product/MyMoney/Domain/Core/MoneyExtensionsSpecs.cs
@@ -4,7 +4,7 @@ using MoMoney.Testing.spechelpers.core;
 
 namespace MoMoney.Domain.Core
 {
-    public class when_converting_a_valid_amount_to_a_money : concerns_for
+    public class when_converting_a_valid_amount_to_a_money : concerns
     {
         it should_return_the_correct_money = () => result.should_be_equal_to(new Money(1, 99));
 
trunk/product/MyMoney/Domain/repositories/company_repository_extensions.cs
@@ -1,22 +0,0 @@
-using System.Linq;
-using MoMoney.Domain.accounting.billing;
-using MoMoney.Domain.Core;
-using MoMoney.Infrastructure.Logging;
-
-namespace MoMoney.Domain.repositories
-{
-    public static class company_repository_extensions
-    {
-        public static ICompany find_company_named(this IRepository repository, string company_name)
-        {
-            var company = repository
-                .all<ICompany>()
-                .SingleOrDefault(x => x.name.Equals(company_name));
-            if (null == company)
-            {
-                Log.For(typeof (company_repository_extensions)).debug("could not find company named:{0}", company_name);
-            }
-            return company;
-        }
-    }
-}
\ No newline at end of file
trunk/product/MyMoney/Domain/repositories/IBillRepository.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+using MoMoney.Domain.accounting.billing;
+
+namespace MoMoney.Domain.repositories
+{
+    public interface IBillRepository
+    {
+        IEnumerable<IBill> all();
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Domain/repositories/ICompanyRepository.cs
@@ -0,0 +1,11 @@
+using System.Collections.Generic;
+using MoMoney.Domain.accounting.billing;
+
+namespace MoMoney.Domain.repositories
+{
+    public interface ICompanyRepository
+    {
+        IEnumerable<ICompany> all();
+        ICompany find_company_named(string name);
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/Container/ResolveSpecs.cs
@@ -5,12 +5,11 @@ using MoMoney.Testing;
 using MoMoney.Testing.MetaData;
 using MoMoney.Testing.spechelpers.contexts;
 using MoMoney.Testing.spechelpers.core;
-using mocking_extensions=MoMoney.Testing.spechelpers.core.mocking_extensions;
 
 namespace MoMoney.Infrastructure.Container
 {
     [Concern(typeof (resolve))]
-    public abstract class behaves_like_a_inversion_of_control_container : concerns_for
+    public abstract class behaves_like_a_inversion_of_control_container : concerns
     {
     }
 
@@ -20,14 +19,14 @@ namespace MoMoney.Infrastructure.Container
                         {
                             registry = an<IDependencyRegistry>();
                             presenter = an<IPresenter>();
-                            mocking_extensions.it_will_return(mocking_extensions.is_told_to(registry, x => x.get_a<IPresenter>()), presenter);
+                            registry.is_told_to(x => x.get_a<IPresenter>()).it_will_return(presenter);
                             resolve.initialize_with(registry);
                         };
 
         because b = () => { result = resolve.dependency_for<IPresenter>(); };
 
         it should_leverage_the_underlying_container_it_was_initialized_with =
-            () => mocking_extensions.was_told_to(registry, x => x.get_a<IPresenter>());
+            () => registry.was_told_to(x => x.get_a<IPresenter>());
 
         it should_return_the_resolved_dependency = () => result.should_be_equal_to(presenter);
 
@@ -43,7 +42,7 @@ namespace MoMoney.Infrastructure.Container
         context c = () =>
                         {
                             registry = an<IDependencyRegistry>();
-                            mocking_extensions.it_will_throw(mocking_extensions.is_told_to(registry, x => x.get_a<IPresenter>()), new Exception());
+                            registry.is_told_to(x => x.get_a<IPresenter>()).it_will_throw(new Exception());
                             resolve.initialize_with(registry);
                         };
 
trunk/product/MyMoney/Infrastructure/interceptors/LazySpecs.cs
@@ -3,12 +3,11 @@ using MoMoney.Infrastructure.Container;
 using MoMoney.Testing.MetaData;
 using MoMoney.Testing.spechelpers.contexts;
 using MoMoney.Testing.spechelpers.core;
-using mocking_extensions=MoMoney.Testing.spechelpers.core.mocking_extensions;
 
 namespace MoMoney.Infrastructure.interceptors
 {
     [Concern(typeof (Lazy))]
-    public abstract class behaves_like_a_lazy_loaded_object : concerns_for
+    public abstract class behaves_like_a_lazy_loaded_object : concerns
     {
         context c = () =>
                         {
trunk/product/MyMoney/Infrastructure/Logging/LogSpecs.cs
@@ -3,26 +3,25 @@ using MoMoney.Infrastructure.Container;
 using MoMoney.Testing.MetaData;
 using MoMoney.Testing.spechelpers.contexts;
 using MoMoney.Testing.spechelpers.core;
-using mocking_extensions=MoMoney.Testing.spechelpers.core.mocking_extensions;
 
 namespace MoMoney.Infrastructure.Logging
 {
     [Concern(typeof (Log))]
-    public class when_creating_a_logger_for_a_particular_type_ : concerns_for
+    public class when_creating_a_logger_for_a_particular_type_ : concerns
     {
         it should_return_the_logger_created_for_that_type = () => result.should_be_equal_to(logger);
 
-        context c = () =>
-                        {
-                            var factory = an<ILogFactory>();
-                            var registry = an<IDependencyRegistry>();
-                            logger = an<ILogger>();
-                            mocking_extensions.it_will_return(mocking_extensions.is_told_to(registry, x => x.get_a<ILogFactory>()), factory);
+        context c =
+            () =>
+                {
+                    var factory = an<ILogFactory>();
+                    var registry = an<IDependencyRegistry>();
+                    logger = an<ILogger>();
+                    registry.is_told_to(x => x.get_a<ILogFactory>()).it_will_return(factory);
+                    factory.is_told_to(x => x.create_for(typeof (string))).it_will_return(logger);
 
-                            mocking_extensions.it_will_return(mocking_extensions.is_told_to(factory, x => x.create_for(typeof (string))), logger);
-
-                            resolve.initialize_with(registry);
-                        };
+                    resolve.initialize_with(registry);
+                };
 
         because b = () => { result = Log.For("mo"); };
 
trunk/product/MyMoney/Infrastructure/transactions/unit_of_work.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Linq;
 using System.Collections.Generic;
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.Core;
 using MoMoney.Utility.Extensions;
 
@@ -19,11 +20,11 @@ namespace MoMoney.Infrastructure.transactions
 
     public class unit_of_work<T> : IUnitOfWork<T> where T : IEntity
     {
-        readonly IRepository repository;
+        readonly IDatabaseGateway repository;
         readonly IUnitOfWorkRegistrationFactory<T> factory;
         readonly IList<IUnitOfWorkRegistration<T>> registered_items;
 
-        public unit_of_work(IRepository repository, IUnitOfWorkRegistrationFactory<T> factory)
+        public unit_of_work(IDatabaseGateway repository, IUnitOfWorkRegistrationFactory<T> factory)
         {
             this.repository = repository;
             this.factory = factory;
trunk/product/MyMoney/Infrastructure/transactions/unit_of_work_specs.cs
@@ -1,4 +1,5 @@
 using developwithpassion.bdd.contexts;
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.Core;
 using MoMoney.Testing.MetaData;
 using MoMoney.Testing.spechelpers.contexts;
@@ -16,11 +17,11 @@ namespace MoMoney.Infrastructure.transactions
 
         context c = () =>
                         {
-                            repository = the_dependency<IRepository>();
+                            repository = the_dependency<IDatabaseGateway>();
                             factory = the_dependency<IUnitOfWorkRegistrationFactory<IEntity>>();
                         };
 
-        protected static IRepository repository;
+        protected static IDatabaseGateway repository;
         protected static IUnitOfWorkRegistrationFactory<IEntity> factory;
     }
 
trunk/product/MyMoney/Infrastructure/transactions/UnitOfWorkFactory.cs
@@ -1,3 +1,4 @@
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.Core;
 using MoMoney.Infrastructure.Container;
 
@@ -10,10 +11,10 @@ namespace MoMoney.Infrastructure.transactions
 
     public class UnitOfWorkFactory : IUnitOfWorkFactory
     {
-        readonly IRepository repository;
+        readonly IDatabaseGateway repository;
         readonly IDependencyRegistry registry;
 
-        public UnitOfWorkFactory(IRepository repository, IDependencyRegistry registry)
+        public UnitOfWorkFactory(IDatabaseGateway repository, IDependencyRegistry registry)
         {
             this.repository = repository;
             this.registry = registry;
trunk/product/MyMoney/Presentation/Databindings/ComboBoxDataBindingSpecs.cs
@@ -8,7 +8,7 @@ using mocking_extensions=MoMoney.Testing.spechelpers.core.mocking_extensions;
 namespace MoMoney.Presentation.Databindings
 {
     [Concern(typeof (Create))]
-    public class when_binding_a_property_from_an_object_to_a_combo_box : concerns_for
+    public class when_binding_a_property_from_an_object_to_a_combo_box : concerns
     {
         it should_initialize_the_combo_box_with_the_current_value_of_the_property =
             () => combo_box.SelectedItem.should_be_equal_to(baby_girl);
@@ -38,7 +38,7 @@ namespace MoMoney.Presentation.Databindings
     }
 
     [Concern(typeof (Create))]
-    public class when_changing_the_selected_item_on_a_combo_box_that_is_bound_to_a_property : concerns_for
+    public class when_changing_the_selected_item_on_a_combo_box_that_is_bound_to_a_property : concerns
     {
         it should_change_the_value_of_the_property_that_the_combo_box_is_bound_to =
             () => thing_to_bind_to.Child.should_be_equal_to(baby_boy);
trunk/product/MyMoney/Presentation/Databindings/date_time_property_binding_specs.cs
@@ -8,7 +8,7 @@ using MoMoney.Testing.spechelpers.core;
 namespace MoMoney.Presentation.Databindings
 {
     [Concern(typeof (Create))]
-    public class when_a_new_date_is_selected_by_a_date_time_picker_that_is_bound_to_a_property : concerns_for
+    public class when_a_new_date_is_selected_by_a_date_time_picker_that_is_bound_to_a_property : concerns
     {
         it should_update_the_value_of_the_property =
             () => thing_to_bind_to.birth_day.should_be_equal_to(november_nineteenth);
trunk/product/MyMoney/Presentation/Databindings/TextBoxDataBindingSpecs.cs
@@ -8,7 +8,7 @@ using mocking_extensions=MoMoney.Testing.spechelpers.core.mocking_extensions;
 namespace MoMoney.Presentation.Databindings
 {
     [Concern(typeof (Create))]
-    public class when_binding_a_property_on_an_object_to_a_textbox : concerns_for
+    public class when_binding_a_property_on_an_object_to_a_textbox : concerns
     {
         it should_initialize_the_text_of_the_textbox_to_the_value_of_the_property =
             () => text_box.Text.should_be_equal_to(first_name);
@@ -31,7 +31,7 @@ namespace MoMoney.Presentation.Databindings
     }
 
     [Concern(typeof (Create))]
-    public class when_updating_the_text_of_a_bound_text_box : concerns_for
+    public class when_updating_the_text_of_a_bound_text_box : concerns
     {
         it should_update_the_value_of_the_property_that_the_textbox_is_bound_to =
             () => thing_to_bind_to.FirstName.should_be_equal_to(expected_name);
trunk/product/MyMoney/Presentation/Model/reporting/report_binding_extensions_specs.cs
@@ -8,7 +8,7 @@ using MoMoney.Testing.spechelpers.core;
 namespace MoMoney.Presentation.Model.reporting
 {
     [Concern(typeof (report_binding_extensions))]
-    public class when_binding_a_active_report_control_to_a_string_property_of_a_dto : concerns_for
+    public class when_binding_a_active_report_control_to_a_string_property_of_a_dto : concerns
     {
         it should_set_the_controls_datafield_property_to_the_name_of_the_dtos_property =
             () => control.was_told_to(x => x.DataField = "name");
@@ -21,7 +21,7 @@ namespace MoMoney.Presentation.Model.reporting
     }
 
     [Concern(typeof (report_binding_extensions))]
-    public class when_binding_a_active_report_control_to_a_date_time_property_of_a_dto : concerns_for
+    public class when_binding_a_active_report_control_to_a_date_time_property_of_a_dto : concerns
     {
         it should_set_the_controls_datafield_property_to_the_name_of_the_dtos_property =
             () => control.was_told_to(x => x.DataField = "birthdate");
trunk/product/MyMoney/Presentation/Views/helpers/EventTriggerSpecs.cs
@@ -6,7 +6,7 @@ using MoMoney.Testing.spechelpers.core;
 
 namespace MoMoney.Presentation.Views.helpers
 {
-    public class when_invoking_a_call_on_a_target_via_reflection : concerns_for
+    public class when_invoking_a_call_on_a_target_via_reflection : concerns
     {
         it should_correctly_call_that_method =
             () =>
@@ -24,7 +24,7 @@ namespace MoMoney.Presentation.Views.helpers
         static TestControl control;
     }
 
-    public class when_invoking_a_call_on_a_target_by_passing_in_a_parameter : concerns_for
+    public class when_invoking_a_call_on_a_target_by_passing_in_a_parameter : concerns
     {
         it should_make_the_call_correctly = () => control.key_press_arguments.should_be_equal_to(args);
 
trunk/product/MyMoney/Tasks/application/BillingTasks.cs
@@ -19,25 +19,27 @@ namespace MoMoney.Tasks.application
     [Interceptor(typeof (IUnitOfWorkInterceptor))]
     public class BillingTasks : IBillingTasks
     {
-        private readonly IRepository repository;
-        private readonly ICustomerTasks tasks;
+        readonly IBillRepository bills;
+        readonly ICompanyRepository companys;
+        readonly ICustomerTasks tasks;
 
-        public BillingTasks(IRepository repository, ICustomerTasks tasks)
+        public BillingTasks(IBillRepository bills, ICompanyRepository companys, ICustomerTasks tasks)
         {
-            this.repository = repository;
+            this.bills = bills;
+            this.companys = companys;
             this.tasks = tasks;
         }
 
         public void save_a_new_bill_using(add_new_bill_dto dto)
         {
-            var company = repository.find_company_named(dto.company_name);
+            var company = companys.find_company_named(dto.company_name);
             var customer = tasks.get_the_current_customer();
             company.issue_bill_to(customer, dto.due_date, dto.total.as_money());
         }
 
         public IEnumerable<IBill> all_bills()
         {
-            return repository.all<IBill>();
+            return bills.all();
         }
 
         public void register_new_company(register_new_company dto)
@@ -47,7 +49,7 @@ namespace MoMoney.Tasks.application
 
         public IEnumerable<ICompany> all_companys()
         {
-            return repository.all<ICompany>();
+            return companys.all();
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Tasks/application/CustomerTasks.cs
@@ -1,7 +1,7 @@
 using System.Linq;
 using Castle.Core;
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.accounting;
-using MoMoney.Domain.Core;
 using MoMoney.Infrastructure.interceptors;
 
 namespace MoMoney.Tasks.application
@@ -14,9 +14,9 @@ namespace MoMoney.Tasks.application
     [Interceptor(typeof (IUnitOfWorkInterceptor))]
     public class CustomerTasks : ICustomerTasks
     {
-        private readonly IRepository repository;
+        private readonly IDatabaseGateway repository;
 
-        public CustomerTasks(IRepository repository)
+        public CustomerTasks(IDatabaseGateway repository)
         {
             this.repository = repository;
         }
trunk/product/MyMoney/Tasks/application/IncomeTasks.cs
@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using Castle.Core;
+using MoMoney.DataAccess.core;
 using MoMoney.Domain.accounting.billing;
 using MoMoney.Domain.accounting.financial_growth;
 using MoMoney.Domain.Core;
@@ -18,10 +19,10 @@ namespace MoMoney.Tasks.application
     [Interceptor(typeof (IUnitOfWorkInterceptor))]
     public class IncomeTasks : IIncomeTasks
     {
-        private readonly IRepository repository;
+        private readonly IDatabaseGateway repository;
         private readonly ICustomerTasks tasks;
 
-        public IncomeTasks(IRepository repository, ICustomerTasks tasks)
+        public IncomeTasks(IDatabaseGateway repository, ICustomerTasks tasks)
         {
             this.repository = repository;
             this.tasks = tasks;
trunk/product/MyMoney/Testing/spechelpers/contexts/behaves_like_a_repository.cs
@@ -1,6 +1,6 @@
 using developwithpassion.bdd.contexts;
 using MbUnit.Framework;
-using MoMoney.Domain.Core;
+using MoMoney.DataAccess.core;
 using MoMoney.Infrastructure.Container;
 using MoMoney.Infrastructure.Container.Windsor;
 using MoMoney.Testing.MetaData;
@@ -8,13 +8,13 @@ using MoMoney.Testing.MetaData;
 namespace MoMoney.Testing.spechelpers.contexts
 {
     //[run_in_real_container]
-    [Concern(typeof (IRepository))]
+    [Concern(typeof (IDatabaseGateway))]
     [Ignore]
-    public abstract class behaves_like_a_repository : concerns_for<IRepository>
+    public abstract class behaves_like_a_repository : concerns_for<IDatabaseGateway>
     {
-        public override IRepository create_sut()
+        public override IDatabaseGateway create_sut()
         {
-            return resolve.dependency_for<IRepository>();
+            return resolve.dependency_for<IDatabaseGateway>();
         }
 
         before_all_observations all = () => resolve.initialize_with(new WindsorDependencyRegistry());
trunk/product/MyMoney/Testing/spechelpers/contexts/concerns_for.cs → trunk/product/MyMoney/Testing/spechelpers/contexts/concerns.cs
@@ -24,7 +24,7 @@ namespace MoMoney.Testing.spechelpers.contexts
         }
     }
 
-    public abstract class concerns_for : observations_for_a_static_sut, IHideObjectMembers
+    public abstract class concerns : observations_for_a_static_sut, IHideObjectMembers
     {
         static protected T dependency<T>() where T : class
         {
trunk/product/MyMoney/Utility/Extensions/mapping_extensions_specs.cs
@@ -8,7 +8,7 @@ using mocking_extensions=MoMoney.Testing.spechelpers.core.mocking_extensions;
 namespace MoMoney.Utility.Extensions
 {
     [Concern(typeof (mapping_extensions))]
-    public class when_transforming_type_A_to_type_B_then_C : concerns_for
+    public class when_transforming_type_A_to_type_B_then_C : concerns
     {
         it should_return_the_correct_result = () => result.should_be_equal_to(1);
 
trunk/product/MyMoney/Utility/Extensions/numeric_conversions_specs.cs
@@ -4,7 +4,7 @@ using MoMoney.Testing.spechelpers.core;
 
 namespace MoMoney.Utility.Extensions
 {
-    public class when_converting_a_valid_string_to_a_long : concerns_for
+    public class when_converting_a_valid_string_to_a_long : concerns
     {
         it should_return_the_correct_result = () => result.should_be_equal_to(88L);
 
@@ -16,7 +16,7 @@ namespace MoMoney.Utility.Extensions
         static string valid_numeric_string;
     }
 
-    public class when_converting_a_valid_string_to_an_int : concerns_for
+    public class when_converting_a_valid_string_to_an_int : concerns
     {
         it should_return_the_correct_result = () => result.should_be_equal_to(66);
 
trunk/product/MyMoney/Utility/Extensions/TypeExtensionsSpecs.cs
@@ -4,7 +4,7 @@ using MoMoney.Testing.spechelpers.core;
 
 namespace MoMoney.Utility.Extensions
 {
-    public class when_getting_the_last_interface_for_a_type : concerns_for
+    public class when_getting_the_last_interface_for_a_type : concerns
     {
         it should_return_the_correct_one = () => typeof (TestType).last_interface().should_be_equal_to(typeof (ITestType));
     }
trunk/product/MyMoney/MyMoney.csproj
@@ -154,11 +154,12 @@
   <ItemGroup>
     <Compile Include="DataAccess\db40\ConnectionFactory.cs" />
     <Compile Include="DataAccess\db40\DatabaseConfiguration.cs" />
-    <Compile Include="DataAccess\db40\ObjectRepository.cs" />
-    <Compile Include="DataAccess\db40\ObjectRepositorySpecs.cs" />
+    <Compile Include="DataAccess\db40\ObjectDatabaseGateway.cs" />
+    <Compile Include="DataAccess\db40\ObjectDatabaseGatewaySpecs.cs" />
     <Compile Include="DataAccess\db40\spiking\db40_spike_specs.cs" />
+    <Compile Include="DataAccess\repositories\BillRepository.cs" />
     <Compile Include="DataAccess\repositories\bill_repository_specs.cs" />
-    <Compile Include="DataAccess\sqlcompact\sql_compant_repository_specs.cs" />
+    <Compile Include="DataAccess\repositories\CompanyRepository.cs" />
     <Compile Include="Domain\accounting\billing\IEmployee.cs" />
     <Compile Include="Domain\accounting\financial_growth\income.cs" />
     <Compile Include="Domain\accounting\financial_growth\income_extensions.cs" />
@@ -169,7 +170,7 @@
     <Compile Include="Domain\Core\day.cs" />
     <Compile Include="Domain\Core\Entity.cs" />
     <Compile Include="Domain\Core\date.cs" />
-    <Compile Include="Domain\Core\IRepository.cs" />
+    <Compile Include="DataAccess\core\IDatabaseGateway.cs" />
     <Compile Include="DataAccess\db40\SessionFactory.cs" />
     <Compile Include="DataAccess\db40\SessionFactorySpecs.cs" />
     <Compile Include="Domain\accounting\billing\billing_extensions.cs" />
@@ -179,12 +180,13 @@
     <Compile Include="Domain\accounting\AccountHolderSpecs.cs" />
     <Compile Include="Domain\accounting\billing\total_payments_calculator.cs" />
     <Compile Include="Domain\Core\IYear.cs" />
-    <Compile Include="Domain\Core\money_extensions.cs" />
-    <Compile Include="Domain\Core\money_extensions_specs.cs" />
+    <Compile Include="Domain\Core\MoneyExtensions.cs" />
+    <Compile Include="Domain\Core\MoneyExtensionsSpecs.cs" />
     <Compile Include="Domain\Core\MoneySpecs.cs" />
     <Compile Include="Domain\Core\range.cs" />
     <Compile Include="Domain\Core\range_specs.cs" />
-    <Compile Include="Domain\repositories\company_repository_extensions.cs" />
+    <Compile Include="Domain\repositories\IBillRepository.cs" />
+    <Compile Include="Domain\repositories\ICompanyRepository.cs" />
     <Compile Include="Infrastructure\caching\IdentityMapSpecs.cs" />
     <Compile Include="Infrastructure\caching\IIdentityMap.cs" />
     <Compile Include="Infrastructure\cloning\BinarySerializer.cs" />
@@ -518,7 +520,7 @@
     <Compile Include="Tasks\infrastructure\LogFileTasks.cs" />
     <Compile Include="Tasks\infrastructure\UpdateTasks.cs" />
     <Compile Include="Testing\MetaData\IntegrationAttribute.cs" />
-    <Compile Include="Testing\spechelpers\contexts\concerns_for.cs" />
+    <Compile Include="Testing\spechelpers\contexts\concerns.cs" />
     <Compile Include="Testing\spechelpers\contexts\behaves_like_a_repository.cs" />
     <Compile Include="Testing\spechelpers\core\empty_fixture.cs" />
     <Compile Include="Testing\spechelpers\core\IHideObjectMembers.cs" />
@@ -745,6 +747,7 @@
     <Compile Include="windows.ui\wire_up_the_views_in_to_the.cs" />
   </ItemGroup>
   <ItemGroup>
+    <Folder Include="DataAccess\sqlcompact\" />
     <Folder Include="Presentation\module\" />
     <Folder Include="Tasks\domain\" />
     <Folder Include="Tasks\Stubs\" />