package mo

import (
	"testing"
)

func TestConvert_ME(t *testing.T) {
	td := D{
		{Key: "testString", Value: "testValue"},
		{Key: "testNumber", Value: 3.1415926},
		{Key: "testArray", Value: []any{"111", 222, 3.33, true, ID.New()}},
	}
	m, err := ToM(td)
	if err != nil {
		t.Error(err)
		return
	}
	t.Log(m)
}

func TestConvert_DE(t *testing.T) {
	tm := M{
		"testString": "testValue",
		"testNumber": 3.1415926,
		"testArray":  []any{"111", 222, 3.33, true, ID.New()},
	}
	m, err := ToD(tm)
	if err != nil {
		t.Error(err)
		return
	}
	t.Log(m)
}
