summaryrefslogtreecommitdiff
path: root/slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs
diff options
context:
space:
mode:
authormokhan <mokhan@da190166-9cfc-4ee1-ae03-434a172be219>2009-02-21 21:44:27 +0000
committermokhan <mokhan@da190166-9cfc-4ee1-ae03-434a172be219>2009-02-21 21:44:27 +0000
commit1dfdccb8118aeaa3cd844ac8de2a672c93312166 (patch)
tree4b19e7f816ab1019f180a46b68572af4b66fe4bc /slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs
parent42d66bcab8262c7b8b2452615df535e694a3ec1c (diff)
git-svn-id: http://svn.xp-dev.com/svn/mokhan-sait@2 da190166-9cfc-4ee1-ae03-434a172be219
Diffstat (limited to 'slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs')
-rw-r--r--slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs b/slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs
new file mode 100644
index 0000000..ef32eac
--- /dev/null
+++ b/slips/src/test/Marina.Test/Integration/DataAccess/Mappers/CustomerDataMapperTest.cs
@@ -0,0 +1,25 @@
+using Marina.DataAccess.DataMappers;
+using Marina.Domain.Interfaces;
+using Marina.Test.Integration.DataAccess.Utility;
+using Marina.Test.Utility;
+using MbUnit.Framework;
+
+namespace Marina.Test.Integration.DataAccess.Mappers {
+ public class CustomerDataMapperTest {
+ public ICustomerDataMapper CreateSUT() {
+ return new CustomerDataMapper( );
+ }
+
+ [Test]
+ [RollBack]
+ [RunInRealContainer]
+ public void Should_be_able_to_find_customer_by_username() {
+ string username = "mokhan";
+ long customerId = CustomerMother.CreateCustomerRecordWith( username );
+
+ ICustomer foundCustomer = CreateSUT( ).FindBy( username );
+ Assert.AreEqual( customerId, foundCustomer.ID( ) );
+ Assert.AreEqual( username, foundCustomer.Registration( ).Username( ) );
+ }
+ }
+} \ No newline at end of file