pulumi/pkg/codegen/dotnet/gen_program_test.go

42 lines
1.0 KiB
Go

package dotnet
import (
"testing"
"github.com/pulumi/pulumi/pkg/v3/codegen"
"github.com/pulumi/pulumi/pkg/v3/codegen/testing/test"
)
func TestGenerateProgram(t *testing.T) {
t.Parallel()
test.TestProgramCodegen(t,
test.ProgramCodegenOptions{
Language: "dotnet",
Extension: "cs",
OutputFile: "Program.cs",
Check: func(t *testing.T, path string, dependencies codegen.StringSet) {
Check(t, path, dependencies, true, "../../../../../../../sdk/dotnet/Pulumi")
},
GenProgram: GenerateProgram,
TestCases: test.PulumiPulumiProgramTests,
},
)
}
func TestGenerateComponentResource(t *testing.T) {
t.Parallel()
test.TestProgramCodegen(t,
test.ProgramCodegenOptions{
Language: "dotnet",
Extension: "cs",
OutputFile: "ComponentResource.cs",
Check: func(t *testing.T, path string, dependencies codegen.StringSet) {
Check(t, path, dependencies, false, "../../../../../../../sdk/dotnet/Pulumi")
},
GenProgram: GenerateComponentResource,
TestCases: test.PulumiPulumiComponentResourceTests,
})
}