public void Cleanup() { CredentialsFailedAfterLoginEvent.Fired -= CredentialsFailedAfterLoginEvent_Fired1; RemotingClient.HasLoginFailed = false; RevertMiddleTierSettingsIfNeeded(); Security.CurUser = Userods.GetFirstOrDefault(x => x.UserName == UnitTestUserName); Security.PasswordTyped = UnitTestPassword; }