package utils

import (
	"github.com/stretchr/testify/assert"
	"testing"
)

func Test_ToJson(t *testing.T) {
	type B struct {
		Value string
	}
	type A struct {
		B *B
	}

	a := &A{
		B: &B{Value: "dummy"},
	}

	js := ToJson(a)
	assert.Equal(t, "{\"B\":{\"Value\":\"dummy\"}}", js)
}
