Skip to content
Snippets Groups Projects
Select Git revision
  • 829bb6c2125b9d3ac5a95ef985e6d68c89d4a805
  • dev default
  • 61-feature-add-optional-backwards-mapping-for-consistency-with-older-version
  • 61-feature-add-optional-backwards-mapping-for-consistency-with-older-version-2
  • main protected
  • 11-test-fix-tests-to-handle-licensed-data-resources-from-trud-snd-omop
  • general
  • pypi
  • old-main
  • v0.0.3
10 results

omop.py

Blame
  • AbstractTest.java 1.19 KiB
    package com.javacodegeeks.nio.large_file_transfer;
    
    import static org.junit.Assert.assertEquals;
    
    import java.io.File;
    import java.io.IOException;
    import java.nio.file.Files;
    
    import org.junit.AfterClass;
    import org.junit.Before;
    import org.junit.BeforeClass;
    
    public abstract class AbstractTest {
    
        protected static final String SRC = "/tmp/input.tar.gz";
        protected static final String TARGET = "/tmp/output";
        protected static final long AWAIT_TEST_COMPLETE = 20000l;
    
        protected File srcFile;
        protected File targetFile;
    
        @BeforeClass
        public static void init() {
            Thread.currentThread().getContextClassLoader().setDefaultAssertionStatus(true);
        }
    
        @AfterClass
        public static void destroy() {
            Thread.currentThread().getContextClassLoader().setDefaultAssertionStatus(false);
        }
    
        @Before
        public void setUp() throws IOException {
            this.srcFile = new File(SRC);
            this.targetFile = new File(TARGET + "/" + this.srcFile.getName());
    
            Files.deleteIfExists(this.targetFile.toPath());
        }
    
        protected final void compare() {
            assertEquals("file did not copy completely", this.srcFile.length(), this.targetFile.length());
        }
    }