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

ItThrowsAnEntityDoesNotExistExceptionIfThePassedInUserDoesntExistYet() private method

        public void ItThrowsAnEntityDoesNotExistExceptionIfThePassedInUserDoesntExistYet()
        {
            BuildDataContextMock(false, true, true);
            var expectedException = new EntityDoesNotExistException(typeof(ApplicationUser), currentUser.Id);

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

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