// Code generated by "gen/generator.go"; DO NOT EDIT.

package provider

import (
	"testing"

	"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)

func TestAccSdwanPreferredColorGroupPolicyObject(t *testing.T) {
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccSdwanPreferredColorGroupPolicyObjectConfig_all(),
				Check: resource.ComposeTestCheckFunc(
					resource.TestCheckResourceAttr("sdwan_preferred_color_group_policy_object.test", "entries.0.primary_color_preference", "blue bronze"),
					resource.TestCheckResourceAttr("sdwan_preferred_color_group_policy_object.test", "entries.0.primary_path_preference", "direct-path"),
					resource.TestCheckResourceAttr("sdwan_preferred_color_group_policy_object.test", "entries.0.secondary_color_preference", "3g"),
					resource.TestCheckResourceAttr("sdwan_preferred_color_group_policy_object.test", "entries.0.secondary_path_preference", "multi-hop-path"),
					resource.TestCheckResourceAttr("sdwan_preferred_color_group_policy_object.test", "entries.0.tertiary_color_preference", "custom1"),
					resource.TestCheckResourceAttr("sdwan_preferred_color_group_policy_object.test", "entries.0.tertiary_path_preference", "all-paths"),
				),
			},
		},
	})
}

func testAccSdwanPreferredColorGroupPolicyObjectConfig_all() string {
	return `
	resource "sdwan_preferred_color_group_policy_object" "test" {
		name = "TF_TEST_ALL"
		entries = [{
			primary_color_preference = "blue bronze"
			primary_path_preference = "direct-path"
			secondary_color_preference = "3g"
			secondary_path_preference = "multi-hop-path"
			tertiary_color_preference = "custom1"
			tertiary_path_preference = "all-paths"
		}]
	}
	`
}
