Exemple #1
0
        public void MembershipPostGetAccept()
        {
            var mockDb = new MockDatabase();

            BasicDb(mockDb);

            MembershipController controller = new MembershipController(mockDb);


            var membership = (controller.Accept(teamId: 1, userId: 2) as OkNegotiatedContentResult <Membership>).Content;
            var result     = controller.Get(membership.Id) as OkNegotiatedContentResult <Membership>;

            Assert.IsNotNull(result);

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