BusinessLogic.Tests.UnitTests.LogicTests.UsersTests.GamingGroupInviteConsumerTests.AddNewUserToGamingGroupTests.ItThrowsAnEntityDoesNotExistExceptionIfTheInvitationDoesntExist C# (CSharp) Method

ItThrowsAnEntityDoesNotExistExceptionIfTheInvitationDoesntExist() private method

        public void ItThrowsAnEntityDoesNotExistExceptionIfTheInvitationDoesntExist()
        {
            BuildDataContextMock(true, false, true);
            var expectedException = new EntityDoesNotExistException(typeof(GamingGroupInvitation), invitationId);

            Exception actualException = Assert.Throws<EntityDoesNotExistException>(
                () => gamingGroupInviteConsumer.AddNewUserToGamingGroup(currentUser.Id, invitationId));

            Assert.That(expectedException.Message, Is.EqualTo(actualException.Message));
        }