public void UserSor_Delete_User() { var user = new UserGenerator(); try { user.CreateInDatabase(); _test.Log(LogStatus.Info, $"Created user: {user.Id} - {user.UserName}"); user.DeleteFromDatabase(); _test.Log(LogStatus.Info, "Deleted user"); // wait a few seconds for the data to be sent Thread.Sleep(TimeSpan.FromSeconds(WaitTime)); var userSyncData = ApiHelpers.GetProductAccessUserResponse( $"{TestEnvironment.DefaultUserType}", new IdCreator(TestEnvironment.ClientCode, (int)user.Id, user.UserName).ToString()); Assert.AreEqual(userSyncData.StatusCode, HttpStatusCode.NotFound, "The API did not respond with a 404"); _test.Log(LogStatus.Pass, "The API responded with a 404"); } catch (Exception e) { ReportException(e); throw; } }