示例#1
0
        public void MembershipBan()
        {
            var mockDb = new MockDatabase();

            DoubleDb(mockDb);

            MembershipController controller = new MembershipController(mockDb);

            controller.BanMember(teamId: 1, toId: 2, fromId: 1);

            var result = controller.Get(2) as OkNegotiatedContentResult <Membership>;

            Assert.IsNotNull(result);

            Assert.AreEqual(1, result.Content.TeamId);
            Assert.AreEqual(2, result.Content.AccountId);
            Assert.AreEqual(MembershipStatus.Banned, result.Content.Status);
        }