aboutsummaryrefslogtreecommitdiffstats
path: root/core.go
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-09-21 13:03:46 +0200
committerbnewbold <bnewbold@robocracy.org>2012-09-21 13:03:46 +0200
commit575dd002be18f170917a98f8bca891b4bd615f78 (patch)
tree5db7245e184110fd0a403b052191fe6d5b3205d4 /core.go
parentb0ecc94ef69d489dcc775038a0c6f65c1c960c8e (diff)
downloadbommom-575dd002be18f170917a98f8bca891b4bd615f78.tar.gz
bommom-575dd002be18f170917a98f8bca891b4bd615f78.zip
basic octopart pricing functionality
Diffstat (limited to 'core.go')
-rw-r--r--core.go12
1 files changed, 11 insertions, 1 deletions
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
}