package org.shedlang.compiler.shidtopatio; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.shedlang.compiler.shid.instructions.Shid; import org.shedlang.compiler.testing.snapshots.SnapshotResolver; import org.shedlang.compiler.testing.snapshots.Snapshotter; import org.shedlang.compiler.types.NamespaceName; import java.io.IOException; import java.util.List; import static org.shedlang.compiler.shidtopatio.ShidToPatioTesting.serialize; @ExtendWith({SnapshotResolver.class}) public class ShidToPatioNamespaceImportTests { @Test public void canGenerateCodeForNamespaceImport(Snapshotter snapshotter) throws IOException { var namespaceName = new NamespaceName(List.of("Example", "Project")); var instruction = Shid.namespaceImport(namespaceName); var context = ShidToPatioContext.EMPTY; var result = ShidToPatio.generateInstruction(instruction, context); snapshotter.assertSnapshot(serialize(result)); } }