blob: ef32eac3e7fb45dfb6fb3d3398fee257a4810db4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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( ) );
}
}
}
|