// Copyright © 2023 Cisco Systems, Inc. and its affiliates.
// All rights reserved.
//
// Licensed under the Mozilla Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://mozilla.org/MPL/2.0/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: MPL-2.0

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

package provider

// Section below is generated&owned by "gen/generator.go". //template:begin imports
import (
	"testing"

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

// End of section. //template:end imports

// Section below is generated&owned by "gen/generator.go". //template:begin testAccDataSource

func TestAccDataSourceIosxeVRF(t *testing.T) {
	var checks []resource.TestCheckFunc
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "description", "VRF22 description"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "rd", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "address_family_ipv4", "true"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "address_family_ipv6", "true"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "vpn_id", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "route_target_import.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "route_target_import.0.stitching", "false"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "route_target_export.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "route_target_export.0.stitching", "false"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv4_route_target_import.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv4_route_target_import_stitching.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv4_route_target_export.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv4_route_target_export_stitching.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv6_route_target_import.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv6_route_target_import_stitching.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv6_route_target_export.0.value", "22:22"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_vrf.test", "ipv6_route_target_export_stitching.0.value", "22:22"))
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccDataSourceIosxeVRFConfig(),
				Check:  resource.ComposeTestCheckFunc(checks...),
			},
		},
	})
}

// End of section. //template:end testAccDataSource

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
// End of section. //template:end testPrerequisites

// Section below is generated&owned by "gen/generator.go". //template:begin testAccDataSourceConfig

func testAccDataSourceIosxeVRFConfig() string {
	config := `resource "iosxe_vrf" "test" {` + "\n"
	config += `	delete_mode = "attributes"` + "\n"
	config += `	name = "VRF22"` + "\n"
	config += `	description = "VRF22 description"` + "\n"
	config += `	rd = "22:22"` + "\n"
	config += `	address_family_ipv4 = true` + "\n"
	config += `	address_family_ipv6 = true` + "\n"
	config += `	vpn_id = "22:22"` + "\n"
	config += `	route_target_import = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `		stitching = false` + "\n"
	config += `	}]` + "\n"
	config += `	route_target_export = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `		stitching = false` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_route_target_import = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_route_target_import_stitching = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_route_target_export = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_route_target_export_stitching = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_route_target_import = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_route_target_import_stitching = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_route_target_export = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_route_target_export_stitching = [{` + "\n"
	config += `		value = "22:22"` + "\n"
	config += `	}]` + "\n"
	config += `}` + "\n"

	config += `
		data "iosxe_vrf" "test" {
			name = "VRF22"
			depends_on = [iosxe_vrf.test]
		}
	`
	return config
}

// End of section. //template:end testAccDataSourceConfig
