示例#1
0
        public void DepositMoney()
        {
            var securitySafe     = new Fake <ISecuritySafe>().FakedObject;
            var statementPrinter = new Fake <IStatementPrinter>().FakedObject;

            var account = new Account(securitySafe, statementPrinter);

            var deposit = CreateDeposit();

            account.Deposit(deposit);

            A.CallTo(() => securitySafe.Add(deposit)).MustHaveHappened();
        }
示例#2
0
 public void Add_should_add_numbers() =>
 Assert.Equal(2, Fake.Add(1, 1));