<commit_before>package net.weverwijk.photo.graph.repo;

import net.weverwijk.photo.graph.model.Photo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.neo4j.helpers.collection.Iterables;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import static org.junit.Assert.assertEquals;

@ContextConfiguration(classes = {TestConfig.class})
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class PhotoRepositoryTest {

  @Autowired
  PhotoRepository repo;

  @Test
  public void testBasic() {
    Photo photo = new Photo("test.jpg");
    repo.save(photo);

    Iterable<Photo> photos = repo.findAll();

    assertEquals(1, Iterables.toList(photos).size());
  }


}<commit_msg>fixed test<commit_after>package net.weverwijk.photo.graph.repo;

import net.weverwijk.photo.graph.model.Photo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.neo4j.helpers.collection.Iterables;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import static org.junit.Assert.assertEquals;

@ContextConfiguration(classes = {TestConfig.class})
@RunWith(SpringJUnit4ClassRunner.class)
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class PhotoRepositoryTest {

  @Autowired
  PhotoRepository repo;

  @Test
  public void testBasic() {
    long numberOfPhotosBefore = repo.count();

    Photo photo = new Photo("test.jpg");
    repo.save(photo);

    long numberOfPhotosAfter = repo.count();

    assertEquals(numberOfPhotosBefore + 1, numberOfPhotosAfter);
  }


}
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.005012531328320802, 'mean_word_length': 6.028169014084507, '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': '986558', 'n_tokens_mistral': 607, 'n_tokens_neox': 592, 'n_words': 97}