// Setup API DSL roots. func init() { design.Design = design.NewAPIDefinition() design.GeneratedMediaTypes = make(design.MediaTypeRoot) design.ProjectedMediaTypes = make(design.MediaTypeRoot) dslengine.Register(design.Design) dslengine.Register(design.GeneratedMediaTypes) }
func init() { gorma.GormaDesign = gorma.NewStorageGroupDefinition() dslengine.Register(gorma.GormaDesign) }
// IterateSets implement Root func (t *TestCD) IterateSets(it dslengine.SetIterator) { it([]dslengine.Definition{t}) } // Reset is a no-op func (t *TestCD) Reset() {} var _ = Describe("ContainerDefinition", func() { var att *AttributeDefinition var testCD *TestCD BeforeEach(func() { dslengine.Reset() att = &AttributeDefinition{Type: Object{}} testCD = &TestCD{AttributeDefinition: att} dslengine.Register(testCD) }) JustBeforeEach(func() { err := dslengine.Run() Ω(err).ShouldNot(HaveOccurred()) }) It("contains attributes", func() { Ω(testCD.Attribute()).Should(Equal(att)) }) }) var _ = Describe("Attribute", func() { var name string var dataType interface{}