import { Block, Output, refkey } from "@alloy-js/core";
import { expect, it } from "vitest";
import * as jv from "../src/components/index.js";
it("imports reference to source file", () => {
expect(
,
).toRenderTo({
"me/test/code/TestReference.java": `
package me.test.code;
public class TestReference {
public TestReference() {}
}
`,
"me/test/code/import/TestImport.java": `
package me.test.code.import;
import me.test.code.TestReference;
public class TestImport {
TestReference myImportedVariable;
public TestImport() {}
}
`,
});
});
it("doesn't import if in same package", () => {
expect(
,
).toRenderTo({
"me/test/code/TestReference.java": `
package me.test.code;
public class TestReference {
public TestReference() {}
}
`,
"me/test/code/TestImport.java": `
package me.test.code;
public class TestImport {
TestReference myImportedVariable;
public TestImport() {}
}
`,
});
});