package main_test
import (
	"encoding/json"
	"log"
	"testing"
	"github.com/mongodb/mongo-go-driver/bson"
	"github.com/stretchr/testify/assert"
	bsonmgo "gopkg.in/mgo.v2/bson"
)
type SomeInterface interface {
}
type SomeStruct struct {
	SomeInterface
}
type SomeParentStruct struct {
	Name  string        `bson:"name"`
	Child SomeInterface `bson:"interface"`
}
func TestJSON(t *testing.T) {
	st := SomeStruct{}
	structExample := SomeParentStruct{
		Child: st,
	}
	doc, err := json.Marshal(structExample)
	assert.Equal(t, err, nil, "JSON")
	log.Printf("%s", doc)
}
func TestMgoBSON(t *testing.T) {
	st := SomeStruct{}
	structExample := SomeParentStruct{
		Child: st,
	}
	doc, err := bsonmgo.Marshal(structExample)
	assert.Equal(t, err, nil, "JSON")
	log.Printf("%s", doc)
}
func TestMongoBSON(t *testing.T) {
	st := SomeStruct{}
	structExample := SomeParentStruct{
		Child: st,
	}
	doc, err := bson.Marshal(structExample)
	assert.Equal(t, err, nil, "JSON")
	log.Printf("%s", doc)
}