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

ItThrowsAnEntityDoesNotExistExceptionIfThePlayerOnTheInviteDoesNotExist() private method

        public void ItThrowsAnEntityDoesNotExistExceptionIfThePlayerOnTheInviteDoesNotExist()
        {
            BuildDataContextMock(true, true, false);

            var expectedException = new EntityDoesNotExistException(typeof(Player), expectedInvitation.PlayerId);

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

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