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

package provider

import (
	"testing"

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

func TestAccSdwanCiscoBFDFeatureTemplate(t *testing.T) {
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccSdwanCiscoBFDFeatureTemplateConfig_minimum(),
				Check:  resource.ComposeTestCheckFunc(),
			},
			{
				Config: testAccSdwanCiscoBFDFeatureTemplateConfig_all(),
				Check: resource.ComposeTestCheckFunc(
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "multiplier", "3"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "poll_interval", "800000"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "default_dscp", "48"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "colors.0.color", "private5"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "colors.0.hello_interval", "1000"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "colors.0.multiplier", "7"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "colors.0.pmtu_discovery", "true"),
					resource.TestCheckResourceAttr("sdwan_cisco_bfd_feature_template.test", "colors.0.dscp", "46"),
				),
			},
		},
	})
}

func testAccSdwanCiscoBFDFeatureTemplateConfig_minimum() string {
	return `
	resource "sdwan_cisco_bfd_feature_template" "test" {
		name = "TF_TEST_MIN"
		description = "Terraform integration test"
		device_types = ["vedge-C8000V"]
	}
	`
}

func testAccSdwanCiscoBFDFeatureTemplateConfig_all() string {
	return `
	resource "sdwan_cisco_bfd_feature_template" "test" {
		name = "TF_TEST_ALL"
		description = "Terraform integration test"
		device_types = ["vedge-C8000V"]
		multiplier = 3
		poll_interval = 800000
		default_dscp = 48
		colors = [{
			color = "private5"
			hello_interval = 1000
			multiplier = 7
			pmtu_discovery = true
			dscp = 46
		}]
	}
	`
}
