owl-blogs/test/mock_entry.go

30 lines
479 B
Go

package test
import (
"owl-blogs/domain/model"
"time"
)
type MockEntryMetaData struct {
Str string
Number int
Date time.Time
}
type MockEntry struct {
model.EntryBase
metaData *MockEntryMetaData
}
func (e *MockEntry) Content() model.EntryContent {
return model.EntryContent(e.metaData.Str)
}
func (e *MockEntry) MetaData() interface{} {
return e.metaData
}
func (e *MockEntry) SetMetaData(metaData interface{}) {
e.metaData = metaData.(*MockEntryMetaData)
}