Created
October 27, 2019 08:34
-
-
Save SunXiaoShan/82251de71cc48834b708e9c7e8c17f68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Test_Charge_Customer_Count() | |
{ | |
//arrange | |
ICheckInFee stubCheckInFee = MockRepository.GenerateStub<ICheckInFee>(); | |
Pub target = new Pub(stubCheckInFee); | |
stubCheckInFee.Stub(x => x.GetFee(Arg<Customer>.Is.Anything)).Return(100); | |
var customers = new List<Customer> | |
{ | |
new Customer{ IsMale = true }, | |
new Customer{ IsMale = false }, | |
new Customer{ IsMale = false }, | |
}; | |
decimal expected = 1; | |
//act | |
var actual = target.CheckIn(customers); | |
//assert | |
Assert.AreEqual(expected, actual); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment