Skip to content

Commit

Permalink
Proper test fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
abreslav committed Jul 10, 2012
1 parent 2f33b99 commit d94dad1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@
import java.util.Collection;
import java.util.List;

import static org.junit.Assert.assertEquals;

/**
* @author abreslav
*/
public class AbstractLazyResolveDescriptorRendererTest extends AbstractLazyResolveTest {
public abstract class AbstractLazyResolveDescriptorRendererTest extends AbstractLazyResolveTest {


protected void doTest(@NotNull String testFile) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import org.jetbrains.jet.lang.resolve.BindingTraceContext;
import org.jetbrains.jet.lang.resolve.TopDownAnalysisParameters;
import org.jetbrains.jet.lang.resolve.name.Name;
import org.junit.After;

import java.util.Collections;

Expand Down Expand Up @@ -66,13 +65,20 @@ public JetCoreEnvironmentWithDisposable(@NotNull ConfigurationKind configuration

}

protected final JetCoreEnvironmentWithDisposable regularEnvironment = new JetCoreEnvironmentWithDisposable(ConfigurationKind.ALL);
protected JetCoreEnvironmentWithDisposable regularEnvironment;

protected Project getProject() {
return regularEnvironment.project;
}

@After

@Override
protected void setUp() throws Exception {
super.setUp();
regularEnvironment = new JetCoreEnvironmentWithDisposable(ConfigurationKind.ALL);
}

@Override
public void tearDown() throws Exception {
Disposer.dispose(rootDisposable);
}
Expand Down

0 comments on commit d94dad1

Please sign in to comment.