<commit_before>package tfl.api.test;

import com.frameworkium.core.api.tests.BaseAPITest;
import com.frameworkium.core.common.retry.RetryFlakyTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import tfl.api.dto.carparkoccupancy.CarParkOccupancies;
import tfl.api.service.carparks.CarParkOccupancyService;

import static com.google.common.truth.Truth.assertThat;

@Test
public class CarParksTest extends BaseAPITest {

    private CarParkOccupancies carParkOccupancies;

    /**
     * Make the service call only once using {@link BeforeClass} to speed up
     * tests while allowing fine grain tests.
     */
    @BeforeClass
    public void setUp() {
        carParkOccupancies = new CarParkOccupancyService().getCarParkOccupancies();
    }

    public void all_car_park_occupancies_more_than_10_spaces() {

        assertThat(carParkOccupancies.getTotalNumFree())
                .isGreaterThan(10);
    }

    public void all_car_park_occupancies_contains_ruislip() {

        assertThat(carParkOccupancies.getNames())
                .contains("Ruislip Gardens Stn (LUL)");
    }

    public void single_car_park_request_information_the_same() {<commit_msg>Ignore one of the TFL tests to try to reduce 429 errors.<commit_after>package tfl.api.test;

import com.frameworkium.core.api.tests.BaseAPITest;
import com.frameworkium.core.common.retry.RetryFlakyTest;
import org.testng.annotations.*;
import tfl.api.dto.carparkoccupancy.CarParkOccupancies;
import tfl.api.service.carparks.CarParkOccupancyService;

import static com.google.common.truth.Truth.assertThat;

@Test
public class CarParksTest extends BaseAPITest {

    private CarParkOccupancies carParkOccupancies;

    /**
     * Make the service call only once using {@link BeforeClass} to speed up
     * tests while allowing fine grain tests.
     */
    @BeforeClass
    public void setUp() {
        carParkOccupancies = new CarParkOccupancyService().getCarParkOccupancies();
    }

    public void all_car_park_occupancies_more_than_10_spaces() {

        assertThat(carParkOccupancies.getTotalNumFree())
                .isGreaterThan(10);
    }

    public void all_car_park_occupancies_contains_ruislip() {

        assertThat(carParkOccupancies.getNames())
                .contains("<NAME> (LUL)");
    }

    @Ignore("Too often gets a 429 error")
    public void single_car_park_request_information_the_same() {
{'fraction_non_alphanumeric': 0.08560794044665013, 'fraction_numerical': 0.005789909015715467, 'mean_word_length': 3.896761133603239, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4929738', 'n_tokens_mistral': 779, 'n_tokens_neox': 734, 'n_words': 147}