func TestGetDoubleInvalidNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDoubleInvalidNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*float64{
		"0": to.Float64Ptr(0),
		"1": nil,
		"2": to.Float64Ptr(-1.2e20),
	}); r != "" {
		t.Fatal(r)
	}
}
GetDoubleInvalidNull - Get float dictionary value {"0": 0.0, "1": null, "2": 1.2e20}
package dictionarygroup
import (
	"context"
	"net/http"
	"reflect"
	"testing"
	"time"
	"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
	"github.com/google/go-cmp/cmp"
)
func newDictionaryClient() *DictionaryClient {
	return NewDictionaryClient(NewDefaultConnection(nil))
}
func TestGetArrayEmpty(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetArrayEmpty(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(len(resp.Value), 0); r != "" {
		t.Fatal(r)
	}
}
func TestGetArrayItemEmpty(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetArrayItemEmpty(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string][]*string{
		"0": to.StringPtrArray("1", "2", "3"),
		"1": {},
		"2": to.StringPtrArray("7", "8", "9"),
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetArrayItemNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetArrayItemNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string][]*string{
		"0": to.StringPtrArray("1", "2", "3"),
		"1": nil,
		"2": to.StringPtrArray("7", "8", "9"),
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetArrayNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetArrayNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if resp.Value != nil {
		t.Fatal("expected nil dictionary")
	}
}
func TestGetArrayValid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetArrayValid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string][]*string{
		"0": to.StringPtrArray("1", "2", "3"),
		"1": to.StringPtrArray("4", "5", "6"),
		"2": to.StringPtrArray("7", "8", "9"),
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetBase64URL(t *testing.T) {
	t.Skip("unmarshalling fails")
	client := newDictionaryClient()
	resp, err := client.GetBase64URL(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string][]byte{
		"0": {},
		"1": {},
		"2": {},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetBooleanInvalidNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetBooleanInvalidNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*bool{
		"0": to.BoolPtr(true),
		"1": nil,
		"2": to.BoolPtr(false),
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetBooleanInvalidString(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetBooleanInvalidString(context.Background(), nil)
	if err == nil {
		t.Fatal("unexpected nil error")
	}
	if !reflect.ValueOf(resp).IsZero() {
		t.Fatal("expected empty response")
	}
}
func TestGetBooleanTfft(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetBooleanTfft(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*bool{
		"0": to.BoolPtr(true),
		"1": to.BoolPtr(false),
		"2": to.BoolPtr(false),
		"3": to.BoolPtr(true),
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetByteInvalidNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetByteInvalidNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string][]byte{
		"0": {0xab, 0xac, 0xad},
		"1": nil,
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetByteValid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetByteValid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string][]byte{
		"0": {255, 255, 255, 250},
		"1": {1, 2, 3},
		"2": {37, 41, 67},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetComplexEmpty(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetComplexEmpty(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*Widget{}); r != "" {
		t.Fatal(r)
	}
}
func TestGetComplexItemEmpty(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetComplexItemEmpty(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*Widget{
		"0": {Integer: to.Int32Ptr(1), String: to.StringPtr("2")},
		"1": {},
		"2": {Integer: to.Int32Ptr(5), String: to.StringPtr("6")},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetComplexItemNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetComplexItemNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*Widget{
		"0": {Integer: to.Int32Ptr(1), String: to.StringPtr("2")},
		"1": nil,
		"2": {Integer: to.Int32Ptr(5), String: to.StringPtr("6")},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetComplexNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetComplexNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if resp.Value != nil {
		t.Fatal("expected nil dictionary")
	}
}
func TestGetComplexValid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetComplexValid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]*Widget{
		"0": {Integer: to.Int32Ptr(1), String: to.StringPtr("2")},
		"1": {Integer: to.Int32Ptr(3), String: to.StringPtr("4")},
		"2": {Integer: to.Int32Ptr(5), String: to.StringPtr("6")},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDateInvalidChars(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateInvalidChars(context.Background(), nil)
	if err == nil {
		t.Fatal("unexpected nil error")
	}
	if !reflect.ValueOf(resp).IsZero() {
		t.Fatal("expected empty response")
	}
}
func TestGetDateInvalidNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateInvalidNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	v1 := time.Date(2012, 1, 1, 0, 0, 0, 0, time.UTC)
	v3 := time.Date(1776, 7, 4, 0, 0, 0, 0, time.UTC)
	if r := cmp.Diff(resp.Value, map[string]*time.Time{
		"0": &v1,
		"1": nil,
		"2": &v3,
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDateTimeInvalidChars(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateTimeInvalidChars(context.Background(), nil)
	if err == nil {
		t.Fatal("unexpected nil error")
	}
	if !reflect.ValueOf(resp).IsZero() {
		t.Fatal("expected empty response")
	}
}
func TestGetDateTimeInvalidNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateTimeInvalidNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	dt1, _ := time.Parse(time.RFC1123, "Fri, 01 Dec 2000 00:00:01 GMT")
	if r := cmp.Diff(resp.Value, map[string]*time.Time{
		"0": &dt1,
		"1": nil,
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDateTimeRFC1123Valid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateTimeRFC1123Valid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	dt1, _ := time.Parse(time.RFC1123, "Fri, 01 Dec 2000 00:00:01 GMT")
	dt2, _ := time.Parse(time.RFC1123, "Wed, 02 Jan 1980 00:11:35 GMT")
	dt3, _ := time.Parse(time.RFC1123, "Wed, 12 Oct 1492 10:15:01 GMT")
	if r := cmp.Diff(resp.Value, map[string]*time.Time{
		"0": &dt1,
		"1": &dt2,
		"2": &dt3,
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDateTimeValid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateTimeValid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	dt1, _ := time.Parse(time.RFC3339, "2000-12-01T00:00:01Z")
	dt2, _ := time.Parse(time.RFC3339, "1980-01-02T00:11:35+01:00")
	dt3, _ := time.Parse(time.RFC3339, "1492-10-12T10:15:01-08:00")
	if r := cmp.Diff(resp.Value, map[string]*time.Time{
		"0": &dt1,
		"1": &dt2,
		"2": &dt3,
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDateValid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDateValid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	dt1 := time.Date(2000, 12, 01, 0, 0, 0, 0, time.UTC)
	dt2 := time.Date(1980, 01, 02, 0, 0, 0, 0, time.UTC)
	dt3 := time.Date(1492, 10, 12, 0, 0, 0, 0, time.UTC)
	if r := cmp.Diff(resp.Value, map[string]*time.Time{
		"0": &dt1,
		"1": &dt2,
		"2": &dt3,
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDictionaryEmpty(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDictionaryEmpty(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]map[string]*string{}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDictionaryItemEmpty(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDictionaryItemEmpty(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]map[string]*string{
		"0": {
			"1": to.StringPtr("one"),
			"2": to.StringPtr("two"),
			"3": to.StringPtr("three"),
		},
		"1": {},
		"2": {
			"7": to.StringPtr("seven"),
			"8": to.StringPtr("eight"),
			"9": to.StringPtr("nine"),
		},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDictionaryItemNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDictionaryItemNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]map[string]*string{
		"0": {
			"1": to.StringPtr("one"),
			"2": to.StringPtr("two"),
			"3": to.StringPtr("three"),
		},
		"1": nil,
		"2": {
			"7": to.StringPtr("seven"),
			"8": to.StringPtr("eight"),
			"9": to.StringPtr("nine"),
		},
	}); r != "" {
		t.Fatal(r)
	}
}
func TestGetDictionaryNull(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDictionaryNull(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if resp.Value != nil {
		t.Fatal("expected nil value")
	}
}
func TestGetDictionaryValid(t *testing.T) {
	client := newDictionaryClient()
	resp, err := client.GetDictionaryValid(context.Background(), nil)
	if err != nil {
		t.Fatal(err)
	}
	if r := cmp.Diff(resp.Value, map[string]map[string]*string{
		"0": {
			"1": to.StringPtr("one"),
			"2": to.StringPtr("two"),
			"3": to.StringPtr("three"),
		},
		"1": {
			"4": to.StringPtr("four"),
			"5": to.StringPtr("five"),
			"6": to.StringPtr("six"),
		},
		"2": {
			"7": to.StringPtr("seven"),
			"8": to.StringPtr("eight"),
			"9": to.StringPtr("nine"),
		},
	}); r != "" {
		t.Fatal(r)
	}
}