<commit_before>package com.intellij.localvcs;

import java.io.File;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

public class LocalVcsTest extends TempDirTestCase {
  private File myFile;
  private LocalVcs myVcs;

  @Before
  public void setUp() {
    myFile = createFile("file");
    myVcs = new LocalVcs();
  }

  @Test
  public void testCommitting() {
    myVcs.addFile(myFile, "");
    assertFalse(myVcs.hasFile(myFile));

    myVcs.commit();
    assertTrue(myVcs.hasFile(myFile));
  }

  @Test
  public void testClearingUncommittedFiles() {
    assertTrue(myVcs.isClean());

    myVcs.addFile(myFile, "");
    assertFalse(myVcs.isClean());

    myVcs.commit();

    assertTrue(myVcs.isClean());
  }

  @Test
  public void testContent() {
    myVcs.addFile(myFile, "content");
    myVcs.commit();

    myVcs.addFile(myFile, "new content");

    assertEquals("content", myVcs.getFileContent(myFile));
  }

  @Test
  public void testContentOnUnknownFile() {
    assertNull(myVcs.getFileContent(myFile));
  }

  @Test
  public void testDelete() {
    myVcs.addFile(myFile, "content");
    myVcs.commit();

    myVcs.deleteFile(myFile);
    assertEquals("content", myVcs.getFileContent(myFile));

    myVcs.commit();
    assertNull(myVcs.getFileContent(myFile));
  }

  @Test
  public void testClearingDeletetFiles() {
    myVcs.addFile(myFile, "content");
    myVcs.commit();

    assertTrue(myVcs.isClean());

    myVcs.deleteFile(myFile);
    assertFalse(myVcs.isClean());

    myVcs.commit();
    assertTrue(myVcs.isClean());
  }
}<commit_msg>my first test<commit_after>package com.intellij.localvcs;

import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;

public class LocalVcsTest {
  private String myFileName;
  private LocalVcs myVcs;

  @Before
  public void setUp() {
    myFileName = "file";
    myVcs = new LocalVcs();
  }

  @Test
  public void testCommitting() {
    myVcs.addFile(myFileName, "");
    assertFalse(myVcs.hasFile(myFileName));

    myVcs.commit();
    assertTrue(myVcs.hasFile(myFileName));
  }

  @Test
  public void testClearingAddedFiles() {
    assertTrue(myVcs.isClean());

    myVcs.addFile(myFileName, "");
    assertFalse(myVcs.isClean());

    myVcs.commit();

    assertTrue(myVcs.isClean());
  }

  @Test
  public void testContentBeforeCommit() {
    myVcs.addFile(myFileName, "content");
    myVcs.commit();

    myVcs.addFile(myFileName, "new content");

    assertEquals("content", myVcs.getFileContent(myFileName));
  }

  //@Test
  //public void testChangingContent() {
  //
  //}

  @Test
  public void testContentOnUnknownFile() {
    assertNull(myVcs.getFileContent(myFileName));
  }

  @Test
  public void testDelete() {
    myVcs.addFile(myFileName, "content");
    myVcs.commit();

    myVcs.deleteFile(myFileName);
    assertEquals("content", myVcs.getFileContent(myFileName));

    myVcs.commit();
    assertNull(myVcs.getFileContent(myFileName));
  }

  @Test
  public void testClearingDeletedFiles() {
    myVcs.addFile(myFileName, "content");
    myVcs.commit();

    assertTrue(myVcs.isClean());

    myVcs.deleteFile(myFileName);
    assertFalse(myVcs.isClean());

    myVcs.commit();
    assertTrue(myVcs.isClean());
  }
}
{'fraction_non_alphanumeric': 0.14092307692307693, 'fraction_numerical': 0.0, 'mean_word_length': 3.7949852507374633, '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': '5039676', 'n_tokens_mistral': 1162, 'n_tokens_neox': 1135, 'n_words': 180}