<commit_before>package com.coronaide.test.ui;

import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import javax.inject.Inject;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.coronaide.core.model.Project;
import com.coronaide.core.model.ProjectRequest;
import com.coronaide.core.service.IProjectService;
import com.coronaide.ui.CoronaUIApplication;

import javafx.scene.control.ListView;
import javafx.scene.input.MouseButton;

public class ProjectDeleteTest extends CoronaUITest {

    @Inject
    private IProjectService projectService;

    private List<Project> testProjects = new ArrayList<>();

    @Before
    public void setup() throws Exception {
        testProjects.add(projectService.create(new ProjectRequest(Paths.get("testProject"))));
        testProjects.add(projectService.create(new ProjectRequest(Paths.get("testProject2"))));
        launch(CoronaUIApplication.class);
    }

    @Test
    public void projectRemoveTest() {
        ListView<Project> listViewProjects = lookup("#listViewProjects").query();
        clickOn("testProject", MouseButton.SECONDARY).clickOn("Delete").clickOn("Yes");
        listViewProjects = lookup("#listViewProjects").query();
        Assert.assertTrue("Expected project list to not contain project which was deleted.",
                listViewProjects.getItems().stream()
                        .filter(p -> p.getName().equals("testProject"))
                        .collect(Collectors.toList()).isEmpty());
    }

    @Test
    public void projectDeleteTest() {
        ListView<Project> listViewProjects = lookup("#listViewProjects").query();
        clickOn("testProject2", MouseButton.SECONDARY).clickOn("Delete").clickOn("#alertCheckbox").clickOn("Yes");
        listViewProjects = lookup("#listViewProjects").query();
        Assert.assertTrue("Expected project list to not contain project which was deleted.",
                listViewProjects.getItems().stream()
                        .filter(p -> p.getName().equals("testProject2"))
                        .collect(Collectors.toList()).isEmpty());<commit_msg>Determine if the delete tests are passing legitimately or not<commit_after>package com.coronaide.test.ui;

import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import javax.inject.Inject;

import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.coronaide.core.model.Project;
import com.coronaide.core.model.ProjectRequest;
import com.coronaide.core.service.IProjectService;
import com.coronaide.ui.CoronaUIApplication;

import javafx.scene.control.ListView;
import javafx.scene.input.MouseButton;

public class ProjectDeleteTest extends CoronaUITest {

    @Inject
    private IProjectService projectService;

    private List<Project> testProjects = new ArrayList<>();

    @Before
    public void setup() throws Exception {
        testProjects.add(projectService.create(new ProjectRequest(Paths.get("testProject"))));
        testProjects.add(projectService.create(new ProjectRequest(Paths.get("testProject2"))));
        launch(CoronaUIApplication.class);
    }

    @Test
    public void projectRemoveTest() {
        ListView<Project> listViewProjects = lookup("#listViewProjects").query();
        Assert.assertTrue("Expected project list to contain project which will be deleted.",
                listViewProjects.getItems().stream()
                        .filter(p -> p.getName().equals("testProject"))
                        .findAny().isPresent());
        clickOn("testProject", MouseButton.SECONDARY).clickOn("Delete").clickOn("Yes");
        listViewProjects = lookup("#listViewProjects").query();
        Assert.assertTrue("Expected project list to not contain project which was deleted.",
                listViewProjects.getItems().stream()
                .filter(p -> p.getName().equals("testProject"))
                .collect(Collectors.toList()).isEmpty());
    }

    @Test
    public void projectDeleteTest() {
        ListView<Project> listViewProjects = lookup("#listViewProjects").query();
        Assert.assertTrue("Expected project list to contain project which will be deleted.",
                listViewProjects.getItems().stream()
                .filter(p -> p.getName().equals("testProject2"))
                .findAny().isPresent());
        clickOn("testProject2", MouseButton.SECONDARY).clickOn("Delete").clickOn("#alertCheckbox").clickOn("Yes");
        listViewProjects = lookup("#listViewProjects").query();
        Assert.assertTrue("Expected project list to not contain project which was deleted.",
                listViewProjects.getItems().stream()
                .filter(p -> p.getName().equals("testProject2"))
                .collect(Collectors.toList()).isEmpty());
{'fraction_non_alphanumeric': 0.1249749649509313, 'fraction_numerical': 0.0014019627478469858, 'mean_word_length': 3.491007194244604, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7061121', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1305, 'n_words': 254}