Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Created October 27, 2019 08:34
Show Gist options
  • Save SunXiaoShan/82251de71cc48834b708e9c7e8c17f68 to your computer and use it in GitHub Desktop.
Save SunXiaoShan/82251de71cc48834b708e9c7e8c17f68 to your computer and use it in GitHub Desktop.
[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