コード例 #1
0
        public void CanAssertInvocations()
        {
            var target = new FakeCalls();

            target.AddBehavior(new DefaultValueBehavior());

            target.TurnOn();
            Assert.Single(target.AsMock().InvocationsFor(c => c.TurnOn()));

            Assert.Equal(0, target.Add(2, 3));
            Assert.Single(target.AsMock().InvocationsFor(c => c.Add(2, 3)));
        }