Beispiel #1
0
        public void CheckThatPayoutsOccurCorrectly()
        {
            // ARRANGE
            IStokvel s = new Stokvel(4, 1000);
            IMember  a = Substitute.For <IMember>();

            s.AddMember(a);
            IMember b = Substitute.For <IMember>();

            s.AddMember(b);
            IMember c = Substitute.For <IMember>();

            s.AddMember(c);
            // ACT
            s.NextMeeting();
            s.NextMeeting();
            s.NextMeeting();
            s.NextMeeting();
            // ASSERT
            a.Received(1).PayOut(Arg.Any <int>());
            b.DidNotReceive().PayOut(Arg.Any <int>());
            c.DidNotReceive().PayOut(Arg.Any <int>());
        }