From 575dd002be18f170917a98f8bca891b4bd615f78 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 21 Sep 2012 13:03:46 +0200 Subject: basic octopart pricing functionality --- core.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'core.go') diff --git a/core.go b/core.go index f6bc5e3..7a7f918 100644 --- a/core.go +++ b/core.go @@ -112,11 +112,21 @@ func makeTestBom() (*BomMeta, *Bom) { Mpn: "WIDG0001", Elements: []string{"W1", "W2"}, Offers: []Offer{o}} + li2 := LineItem{Manufacturer: "Texas Instruments", + Mpn: "NE555", + Elements: []string{"W1", "W2"}, + Offers: []Offer{o}} + li3 := LineItem{Manufacturer: "STMicroelectronics", + Mpn: "L7905CV", + Elements: []string{"W1", "W2"}, + Offers: []Offer{o}} //li.AddOffer(o) b := NewBom("test01") b.AddLineItem(&li) + // tests that lines don't get duplicated b.AddLineItem(&li) - b.AddLineItem(&li) + b.AddLineItem(&li2) + b.AddLineItem(&li3) bm := &BomMeta{Name: "Some Bom", Owner: "Some Owner", Description: "This is such a thing!", HeadVersion: b.Version, Homepage: "http://bommom.com", IsPublicView: true, IsPublicEdit: false} return bm, b } -- cgit v1.2.3