diff --git a/source/developwithpassion.specification.specs/DependencyRegistrySpecs.cs b/source/developwithpassion.specification.specs/DependencyRegistrySpecs.cs index dd98a5b..1215850 100644 --- a/source/developwithpassion.specification.specs/DependencyRegistrySpecs.cs +++ b/source/developwithpassion.specification.specs/DependencyRegistrySpecs.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Data; +using Machine.Fakes.Adapters.Rhinomocks; using Machine.Specifications; using developwithpassion.specifications.core; using developwithpassion.specifications.faking; @@ -9,81 +10,181 @@ namespace developwithpassion.specification.specs { - [Subject(typeof(DependenciesRegistry))] + [Subject(typeof(DependenciesRegistry))] public class DependencyRegistrySpecs { public abstract class concern : Observes { Establish c = () => { + the_connection = fake.an(); dependency_resolver = fake.an(); fake_gateway = fake.an(); - dependencies = new Dictionary(); - sut = new DependenciesRegistry(dependency_resolver,fake_gateway); - sut.downcast_to().explicit_dependencies = dependencies; + dependencies = new Dictionary>(); + sut = new DependenciesRegistry(dependency_resolver, fake_gateway); + sut.downcast_to>().explicit_dependencies = dependencies; }; - protected static IDictionary dependencies; + protected static Dictionary> dependencies; protected static IManageTheDependenciesForASUT sut; protected static IResolveADependencyForTheSUT dependency_resolver; protected static IManageFakes fake_gateway; + protected static Dictionary dependencies_by_name_for_idbconnection; + protected static IDbConnection the_connection; } - public class when_asked_if_it_has_an_explicit_dependency :concern + public class when_creating_sut_with_a_default_dependency_for_idbconnection : concern { Establish c = () => { - dependencies.Add(typeof(IDbConnection), fake.an()); + dependencies_by_name_for_idbconnection = new Dictionary() { { sut.default_dependency_name, the_connection } }; + dependencies.Add(typeof(IDbConnection), dependencies_by_name_for_idbconnection); }; It should_make_the_decision_based_on_whether_an_explicit_dependency_was_registered = () => { - sut.has_been_provided_an(typeof(IDbConnection)).ShouldBeTrue(); - sut.has_been_provided_an(typeof(IDbCommand)).ShouldBeFalse(); + sut.has_been_provided_an(typeof(IDbConnection), "connection").ShouldBeTrue(); + sut.has_been_provided_an(typeof(IDbConnection), sut.default_dependency_name).ShouldBeTrue(); + sut.has_been_provided_an(typeof(IDbCommand), "command").ShouldBeFalse(); }; - + + private static object result; + } + + public class when_creating_sut_with_a_default_dependency_and_specific_dependency_for_idbconnection : concern + { + Establish c = () => + { + specific_connection = fake.an(); + dependencies_by_name_for_idbconnection = new Dictionary() + { + { sut.default_dependency_name, the_connection }, + { "connection", specific_connection} + }; + dependencies.Add(typeof(IDbConnection), dependencies_by_name_for_idbconnection); + }; + + It should_make_the_decision_based_on_whether_an_explicit_dependency_was_registered = () => + { + sut.has_been_provided_an(typeof(IDbConnection), "connection").ShouldBeTrue(); + sut.has_been_provided_an(typeof(IDbConnection), sut.default_dependency_name).ShouldBeTrue(); + sut.has_been_provided_an(typeof(IDbCommand), "command").ShouldBeFalse(); + }; + + It should_have_expected_default_connection = () => + { + sut.get_dependency_of(typeof(IDbConnection), sut.default_dependency_name).ShouldEqual(the_connection); + }; + + It should_have_expected_specific_connection = () => + { + sut.get_dependency_of(typeof(IDbConnection), "connection").ShouldEqual(specific_connection); + }; + + static object result; + static IDbConnection specific_connection; + } + + public class when_creating_sut_without_default_dependency_but_with_specific_dependency_for_idbconnection : concern + { + Establish c = () => + { + specific_connection = fake.an(); + dependencies_by_name_for_idbconnection = new Dictionary() { { "connection", specific_connection} }; + dependencies.Add(typeof(IDbConnection), dependencies_by_name_for_idbconnection); + }; + + It should_make_the_decision_based_on_whether_an_explicit_dependency_was_registered = () => + { + sut.has_been_provided_an(typeof(IDbConnection), "connection").ShouldBeTrue(); + sut.has_been_provided_an(typeof(IDbConnection), sut.default_dependency_name).ShouldBeFalse(); + sut.has_been_provided_an(typeof(IDbCommand), "command").ShouldBeFalse(); + }; + + It should_have_expected_specific_connection = () => + { + sut.get_dependency_of(typeof(IDbConnection), "connection").ShouldEqual(specific_connection); + }; + + static object result; + static IDbConnection specific_connection; } - public class when_getting_a_dependency:concern + + public class when_getting_a_default_dependency : concern { - public class and_the_dependency_has_been_explicitly_provided:when_getting_a_dependency + public class and_the_dependency_has_been_explicitly_provided_with_a_default : when_getting_a_default_dependency + { + private Establish c = () => + { + dependencies_by_name_for_idbconnection = new Dictionary() { { sut.default_dependency_name, the_connection } }; + dependencies.Add(typeof(IDbConnection), dependencies_by_name_for_idbconnection); + }; + + Because b = () => + result = sut.get_dependency_of(typeof(IDbConnection), "parameter_or_property_name"); + + It should_return_the_item_that_was_registered = () => + result.ShouldEqual(the_connection); + + static object result; + } + + public class and_the_dependency_was_not_explicitly_provided : when_getting_a_default_dependency { Establish c = () => { - the_connection = fake.an(); - dependencies.Add(typeof(IDbConnection),the_connection); + dependency_resolver.setup(x => x.resolve(typeof(IDbConnection))).Return(the_connection); }; Because b = () => - result = sut.get_dependency_of(typeof(IDbConnection)); + result = sut.get_dependency_of(typeof(IDbConnection), "parameter_or_property_name"); + + It should_return_the_item_created_by_the_dependency_resolver = () => + result.ShouldEqual(the_connection); + + static object result; + } + } + + public class when_getting_a_specific_dependency : concern + { + public class and_the_dependency_has_been_explicitly_provided_with_a_name : when_getting_a_default_dependency + { + private Establish c = () => + { + dependencies_by_name_for_idbconnection = new Dictionary() { { "connection", the_connection } }; + dependencies.Add(typeof(IDbConnection), dependencies_by_name_for_idbconnection); + }; + + Because b = () => + result = sut.get_dependency_of(typeof(IDbConnection), "connection"); It should_return_the_item_that_was_registered = () => result.ShouldEqual(the_connection); static object result; - static IDbConnection the_connection; - } + } - public class and_the_dependency_was_not_explicitly_provided:when_getting_a_dependency + public class and_the_dependency_was_not_explicitly_provided : when_getting_a_default_dependency { Establish c = () => { - the_connection = fake.an(); dependency_resolver.setup(x => x.resolve(typeof(IDbConnection))).Return(the_connection); }; Because b = () => - result = sut.get_dependency_of(typeof(IDbConnection)); + result = sut.get_dependency_of(typeof(IDbConnection), "connection"); It should_return_the_item_created_by_the_dependency_resolver = () => result.ShouldEqual(the_connection); static object result; - static IDbConnection the_connection; - } + } } - public class when_storing_a_dependency : concern + + public class when_storing_default_dependencies : concern { - public class and_it_has_not_already_been_stored : when_storing_a_dependency + public class and_it_has_not_already_been_stored : when_storing_default_dependencies { Establish c = () => { @@ -93,8 +194,8 @@ public class and_it_has_not_already_been_stored : when_storing_a_dependency Because b = () => result = sut.on(the_connection); - It should_be_stored_in_the_underlying_dependencies = () => - dependencies[typeof(IDbConnection)].ShouldEqual(the_connection); + private It should_be_stored_in_the_default_underlying_dependencies = () => + dependencies[typeof(IDbConnection)][sut.default_dependency_name].ShouldEqual(the_connection); It should_return_the_instance_being_registered = () => result.ShouldEqual(the_connection); @@ -102,11 +203,10 @@ public class and_it_has_not_already_been_stored : when_storing_a_dependency static IDbConnection the_connection; static IDbConnection result; } - public class and_it_has_already_been_stored : when_storing_a_dependency + public class and_it_has_already_been_stored : when_storing_default_dependencies { Establish c = () => { - the_connection = fake.an(); the_new_connection = fake.an(); sut.on(the_connection); }; @@ -114,18 +214,17 @@ public class and_it_has_already_been_stored : when_storing_a_dependency Because b = () => result = sut.on(the_new_connection); - It should_replace_the_existing_instance = () => - dependencies[typeof(IDbConnection)].ShouldEqual(the_new_connection); + It should_replace_the_existing_default_instance = () => + dependencies[typeof(IDbConnection)][sut.default_dependency_name].ShouldEqual(the_new_connection); It should_return_the_instance_being_registered = () => result.ShouldEqual(the_new_connection); - static IDbConnection the_connection; static IDbConnection result; static IDbConnection the_new_connection; } - public class and_the_dependency_is_not_being_provided:when_storing_a_dependency + public class and_the_dependency_is_not_being_provided : when_storing_default_dependencies { Establish c = () => { @@ -136,12 +235,12 @@ public class and_the_dependency_is_not_being_provided:when_storing_a_dependency Because b = () => result = sut.on(); - It should_store_the_item_created_by_the_fake_gateway = () => - dependencies[typeof(IDbConnection)].ShouldEqual(the_connection_created_by_the_fake_gateway); + private It should_store_the_item_created_by_the_fake_gateway_as_the_default = () => + dependencies[typeof(IDbConnection)][sut.default_dependency_name].ShouldEqual(the_connection_created_by_the_fake_gateway); It should_return_the_item_created_by_the_fake_gateway = () => result = the_connection_created_by_the_fake_gateway; - + static IDbConnection the_connection_created_by_the_fake_gateway; static IDbConnection result; diff --git a/source/developwithpassion.specification.specs/NonCtorDependencySetterSpecs.cs b/source/developwithpassion.specification.specs/NonCtorDependencySetterSpecs.cs index a54d6eb..9f7ac3f 100644 --- a/source/developwithpassion.specification.specs/NonCtorDependencySetterSpecs.cs +++ b/source/developwithpassion.specification.specs/NonCtorDependencySetterSpecs.cs @@ -32,9 +32,9 @@ public class when_visting_an_item_that_inherits : concern Establish c = () => { item = new ItemThatInherits(); - dependency_registry.setup(x => x.has_been_provided_an(typeof(IDbConnection))) + dependency_registry.setup(x => x.has_been_provided_an(typeof(IDbConnection), "connection")) .Return(true); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection))) + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection), "connection")) .Return(fake.an()); }; @@ -67,9 +67,9 @@ public class when_visting_an_item_that_has_non_public_accessor : concern Establish c = () => { item = new ItemToUpdate(); - dependency_registry.setup(x => x.has_been_provided_an(typeof(IDbConnection))) + dependency_registry.setup(x => x.has_been_provided_an(typeof(IDbConnection), "connection")) .Return(true); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection))) + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection), "connection")) .Return(fake.an()); }; @@ -91,8 +91,8 @@ public class when_the_dependency_manager_throws_an_exception_while_trying_to_get Establish c = () => { original_exception = new Exception(); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection))).Throw(original_exception); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDataAdapter))).Return(fake.an()); + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection), "connection")).Throw(original_exception); + dependency_registry.setup(x => x.get_dependency_of(typeof(IDataAdapter), "adapter")).Return(fake.an()); item = new AnItem(); }; @@ -127,7 +127,7 @@ public class and_a_value_has_been_registered_in_the_registry : and_the_accessors Establish c = () => { the_connection_from_the_registry = fake.an(); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection))).Return( + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection), "connection")).Return( the_connection_from_the_registry); item = new ItemToUpdate(); }; @@ -167,8 +167,8 @@ public class and_the_dependencies_were_explicitly_specified_in_the_registry : Establish c = () => { the_connection_from_the_registry = fake.an(); - dependency_registry.setup(x => x.has_been_provided_an(typeof(IDbConnection))).Return(true); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection))).Return( + dependency_registry.setup(x => x.has_been_provided_an(typeof(IDbConnection), "connection")).Return(true); + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection), "connection")).Return( the_connection_from_the_registry); original_connection = fake.an(); item = new ItemToUpdate {connection = original_connection}; @@ -199,8 +199,8 @@ public class ItemWithInitializer Establish c = () => { item = new SomeItem(); - dependency_registry.setup(x => x.has_been_provided_an(typeof(SomeItem))).Return(true); - dependency_registry.setup(x => x.get_dependency_of(typeof(SomeItem))).Return( + dependency_registry.setup(x => x.has_been_provided_an(typeof(SomeItem), "some_item")).Return(true); + dependency_registry.setup(x => x.get_dependency_of(typeof(SomeItem), "some_item")).Return( item); target = new ItemWithInitializer(); }; diff --git a/source/developwithpassion.specification.specs/SUTFactorySpecs.cs b/source/developwithpassion.specification.specs/SUTFactorySpecs.cs index 74894ad..2de2434 100755 --- a/source/developwithpassion.specification.specs/SUTFactorySpecs.cs +++ b/source/developwithpassion.specification.specs/SUTFactorySpecs.cs @@ -20,8 +20,8 @@ public class concern : Observes command = fake.an(); non_ctor_dependency_visitor = fake.an(); dependency_registry = fake.an(); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection))).Return(connection); - dependency_registry.setup(x => x.get_dependency_of(typeof(IDbCommand))).Return(command); + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbConnection), "connection")).Return(connection); + dependency_registry.setup(x => x.get_dependency_of(typeof(IDbCommand), "command")).Return(command); }; protected static DefaultSUTFactory create_sut() @@ -97,7 +97,7 @@ public class and_arguments_have_not_been_specifically_provided : when_creating_a_type_that_has_constructor_parameters_that_cant_be_faked { Establish c = () => - dependency_registry.setup(x => x.get_dependency_of(typeof(SomeOtherType))).Throw(original_exception); + dependency_registry.setup(x => x.get_dependency_of(typeof(SomeOtherType), "other")).Throw(original_exception); Because b = () => spec.catch_exception(() => sut.create()); @@ -112,7 +112,7 @@ public class and_the_arguments_have_been_specifically_provided : Establish c = () => { the_item = new SomeOtherType(3); - dependency_registry.setup(x => x.get_dependency_of(typeof(SomeOtherType))).Return(the_item); + dependency_registry.setup(x => x.get_dependency_of(typeof(SomeOtherType), "other")).Return(the_item); }; Because b = () => @@ -133,7 +133,9 @@ public class when_creating_an_item_and_no_constructor_arguments_have_been_provid }; Because b = () => + { result = sut.create(); + }; static ItemToCreate created_item; static ItemToCreate result; diff --git a/source/developwithpassion.specification.specs/developwithpassion.specification.specs.csproj-831153744 b/source/developwithpassion.specification.specs/developwithpassion.specification.specs.csproj-831153744 new file mode 100644 index 0000000..6f68727 --- /dev/null +++ b/source/developwithpassion.specification.specs/developwithpassion.specification.specs.csproj-831153744 @@ -0,0 +1,119 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {4FC95825-0068-4538-9420-CC66D052234D} + Library + Properties + developwithpassion.specification.specs + developwithpassion.specification.specs + v4.0 + 512 + + + true + full + false + C:/Projects/developwithpassion.specifications/artifacts + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + C:/Projects/developwithpassion.specifications/artifacts + TRACE + prompt + 4 + + + + False + ..\..\packages\Machine.Fakes.1.4.0\lib\net40\Machine.Fakes.dll + + + False + ..\..\packages\Machine.Fakes.RhinoMocks.1.4.0\lib\net40\Machine.Fakes.Adapters.RhinoMocks.dll + + + False + ..\..\packages\Machine.Specifications.0.5.12\lib\net40\Machine.Specifications.dll + + + False + ..\..\packages\Machine.Specifications.0.5.12\lib\net40\Machine.Specifications.Clr4.dll + + + ..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll + + + + + + + + + + Properties\SharedAssemblyInfo.cs + + + Properties\VersionInfo.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {DF8F3D71-574A-4910-B409-8849A8C9FF45} + developwithpassion.specifications.rhinomocks + + + {67B140E2-D8BF-4266-9F1F-0C17ADF59BF0} + developwithpassion.specifications + + + + + + + + + + + + diff --git a/source/developwithpassion.specification.specs/utility/ObjectFactory.cs b/source/developwithpassion.specification.specs/utility/ObjectFactory.cs index 2ddc365..1a9ae58 100644 --- a/source/developwithpassion.specification.specs/utility/ObjectFactory.cs +++ b/source/developwithpassion.specification.specs/utility/ObjectFactory.cs @@ -35,7 +35,7 @@ public static IManageTheDependenciesForASUT create_dependencies() where { var fakes_adapter = create_fakes_adapter(); return MainControllerFactory.new_instance().downcast_to() - .dependency_registry_factory.create(fakes_adapter, create_sut_dependency_resolver(fakes_adapter)); + .dependency_registry_factory.create(fakes_adapter, create_sut_dependency_resolver(fakes_adapter)); } public static IUpdateNonCtorDependenciesOnAnItem create_visitor() where Target : class diff --git a/source/developwithpassion.specifications.examples/automatic_sut_creation/with_a_mix_of_fakeable_and_two_non_fakeable_of_the_same_type_contructor_parameters.cs b/source/developwithpassion.specifications.examples/automatic_sut_creation/with_a_mix_of_fakeable_and_two_non_fakeable_of_the_same_type_contructor_parameters.cs new file mode 100644 index 0000000..c8eaeed --- /dev/null +++ b/source/developwithpassion.specifications.examples/automatic_sut_creation/with_a_mix_of_fakeable_and_two_non_fakeable_of_the_same_type_contructor_parameters.cs @@ -0,0 +1,207 @@ +using System; +using System.Data; +using developwithpassion.specifications.rhinomocks; +using Machine.Specifications; + +namespace developwithpassion.specifications.examples.automatic_sut_creation +{ + public class with_a_mix_of_fakeable_and_two_non_fakeable_of_the_same_type_contructor_parameters + { + [Subject(typeof(Calculator))] + public class when_adding_two_numbers_with_specific_date_and_times : Observes + { + private Establish c = () => + { + var date_time = DateTime.Now; + expected_current_date = date_time; + expected_end_date = date_time.Add(TimeSpan.FromDays(8)); + expected_date_on_property = date_time.Add(TimeSpan.FromDays(16)); + depends.on(expected_current_date, "current_date"); + depends.on(expected_end_date, "end_date"); + depends.on(expected_date_on_property, "date_on_property"); + }; + + Because b = () => + result = sut.add(2, 3); + + It should_have_expected_current_date = () => + sut.current_date.ShouldEqual(expected_current_date); + + It should_have_expected_end_date = () => + sut.end_date.ShouldEqual(expected_end_date); + + It should_have_expected_date_on_property = () => + sut.date_on_property.ShouldEqual(expected_date_on_property); + + It should_return_the_sum = () => + result.ShouldEqual(5); + + static int result; + static DateTime expected_end_date; + static DateTime expected_current_date; + static DateTime expected_date_on_property; + } + + [Subject(typeof(Calculator))] + public class when_adding_two_numbers_with_specific_date_and_time_for_property_and_parameter : Observes + { + private Establish c = () => + { + var date_time = DateTime.Now; + expected_current_date = date_time; + expected_date_on_property = date_time.Add(TimeSpan.FromDays(16)); + depends.on(expected_current_date, "current_date"); + depends.on(expected_date_on_property, "date_on_property"); + }; + + Because b = () => + result = sut.add(2, 3); + + It should_have_expected_current_date = () => + sut.current_date.ShouldEqual(expected_current_date); + + It should_have_default_date_time_for_end_time = () => + sut.end_date.ShouldEqual(DateTime.MinValue); + + It should_have_expected_date_on_property = () => + sut.date_on_property.ShouldEqual(expected_date_on_property); + + It should_return_the_sum = () => + result.ShouldEqual(5); + + static int result; + static DateTime expected_current_date; + static DateTime expected_date_on_property; + } + + + [Subject(typeof(Calculator))] + public class when_adding_two_numbers_with_specific_date_and_time_for_property_and_default_for_parameters : Observes + { + private Establish c = () => + { + var date_time = DateTime.Now; + expected_date = date_time; + expected_date_on_property = date_time.Add(TimeSpan.FromDays(16)); + depends.on(expected_date); + depends.on(expected_date_on_property, "date_on_property"); + }; + + Because b = () => + result = sut.add(2, 3); + + It should_have_default_date_time_for_current_date = () => + sut.current_date.ShouldEqual(expected_date); + + It should_have_default_date_time_for_end_time = () => + sut.end_date.ShouldEqual(expected_date); + + It should_have_expected_date_on_property = () => + sut.date_on_property.ShouldEqual(expected_date_on_property); + + It should_return_the_sum = () => + result.ShouldEqual(5); + + static int result; + static DateTime expected_date; + static DateTime expected_date_on_property; + } + + [Subject(typeof(Calculator))] + public class when_adding_two_numbers_with_specific_date_and_time_for_property_and_parameter_and_other_parameter_default : Observes + { + private Establish c = () => + { + var date_time = DateTime.Now; + expected_current_date = date_time; + expected_end_date = date_time.Add(TimeSpan.FromDays(8)); + expected_date_on_property = date_time.Add(TimeSpan.FromDays(16)); + depends.on(expected_current_date, "current_date"); + depends.on(expected_end_date); + depends.on(expected_date_on_property, "date_on_property"); + }; + + Because b = () => + result = sut.add(2, 3); + + It should_have_expected_current_date = () => + sut.current_date.ShouldEqual(expected_current_date); + + It should_have_expected_end_date = () => + sut.end_date.ShouldEqual(expected_end_date); + + It should_have_expected_date_on_property = () => + sut.date_on_property.ShouldEqual(expected_date_on_property); + + It should_return_the_sum = () => + result.ShouldEqual(5); + + static int result; + static DateTime expected_current_date; + static DateTime expected_date_on_property; + static object expected_end_date; + } + + [Subject(typeof(Calculator))] + public class when_adding_two_numbers_with_specific_date_and_time_and_no_default_date_and_time : Observes + { + private Establish c = () => + { + var date_time = DateTime.Now; + expected_current_date = date_time; + expected_date_on_property = date_time.Add(TimeSpan.FromDays(16)); + depends.on(expected_current_date, "current_date"); + }; + + Because b = () => + result = sut.add(2, 3); + + It should_have_expected_current_date = () => + sut.current_date.ShouldEqual(expected_current_date); + + It should_have_default_date_time_for_end_time = () => + sut.end_date.ShouldEqual(DateTime.MinValue); + + It should_have_not_set_the_property_dependency = () => + sut.date_on_property.ShouldEqual(DateTime.MaxValue); + + It should_return_the_sum = () => + result.ShouldEqual(5); + + static int result; + static DateTime expected_current_date; + static DateTime expected_date_on_property; + } + + public delegate void SomeDelegate(); + + public class Calculator + { + IDbConnection connection; + IDataAdapter adapter; + readonly SomeDelegate some_delegate; + + public Calculator(IDbConnection connection, IDataAdapter adapter, DateTime current_date, DateTime end_date, + SomeDelegate some_delegate) + { + this.connection = connection; + this.adapter = adapter; + this.current_date = current_date; + this.end_date = end_date; + this.some_delegate = some_delegate; + this.date_on_property = DateTime.MaxValue; + } + + public DateTime current_date { get; private set; } + + public DateTime end_date { get; private set; } + + public DateTime date_on_property { get; set; } + + public int add(int first, int second) + { + return first + second; + } + } + } +} \ No newline at end of file diff --git a/source/developwithpassion.specifications.examples/developwithpassion.specifications.examples.csproj b/source/developwithpassion.specifications.examples/developwithpassion.specifications.examples.csproj index 5d6b899..a17293d 100755 --- a/source/developwithpassion.specifications.examples/developwithpassion.specifications.examples.csproj +++ b/source/developwithpassion.specifications.examples/developwithpassion.specifications.examples.csproj @@ -31,12 +31,11 @@ 4 - - False + ..\..\packages\Machine.Fakes.1.4.0\lib\net40\Machine.Fakes.dll - ..\..\packages\Machine.Fakes.RhinoMocks.0.5.1\lib\net40\Machine.Fakes.Adapters.RhinoMocks.dll + ..\..\packages\Machine.Fakes.RhinoMocks.1.4.0\lib\net40\Machine.Fakes.Adapters.RhinoMocks.dll False @@ -54,6 +53,7 @@ + @@ -83,6 +83,9 @@ developwithpassion.specifications + + +