<commit_before>package de.avalax.fitbuddy.datalayer;

import de.avalax.fitbuddy.core.workout.Workout;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.runners.MockitoJUnitRunner;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyNoMoreInteractions;

@RunWith(MockitoJUnitRunner.class)
public class FakeWorkoutDAOTest {
    @InjectMocks
    private FakeWorkoutDAO workoutDAO;
    private int anyPosition = 42;

    @Test
    public void testSave_shouldDoNothing() throws Exception {
        Workout workout = mock(Workout.class);

        workoutDAO.save(workout);

        verifyNoMoreInteractions(workout);
    }

    @Test
    public void testLoad_shouldReturnAWorkout() throws Exception {
        Workout workout = workoutDAO.load(anyPosition);

        assertThat(workout, instanceOf(Workout.class));
    }

    @Test
    public void testGetWorkouts_shouldReturnAListOfWorkouts() throws Exception {
        String[] workouts = workoutDAO.getWorkoutlist();

        assertThat(workouts.length, is(not(0)));
    }
}<commit_msg>fixed failing test<commit_after>package de.avalax.fitbuddy.datalayer;

import de.avalax.fitbuddy.core.workout.Workout;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.runners.MockitoJUnitRunner;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsInstanceOf.instanceOf;
import static org.hamcrest.core.IsNot.not;
import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyNoMoreInteractions;

@RunWith(MockitoJUnitRunner.class)
public class FakeWorkoutDAOTest {
    @InjectMocks
    private FakeWorkoutDAO workoutDAO;

    @Test
    public void testSave_shouldDoNothing() throws Exception {
        Workout workout = mock(Workout.class);

        workoutDAO.save(workout);

        verifyNoMoreInteractions(workout);
    }

    @Test
    public void testLoad_shouldReturnAWorkout() throws Exception {
        Workout workout = workoutDAO.load(1);

        assertThat(workout, instanceOf(Workout.class));
    }

    @Test
    public void testGetWorkouts_shouldReturnAListOfWorkouts() throws Exception {
        String[] workouts = workoutDAO.getWorkoutlist();

        assertThat(workouts.length, is(not(0)));
    }
}
{'fraction_non_alphanumeric': 0.092151503319016, 'fraction_numerical': 0.001952362358453729, 'mean_word_length': 4.271604938271605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2772179', 'n_tokens_mistral': 813, 'n_tokens_neox': 805, 'n_words': 148}