blob: ba3172eac4e8ae3cd7ece97606ff0a7cd32d8ab8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package reader
import (
"testing"
)
func TestReadDML(t *testing.T) {
d, _ := ReadDML("/home/lemon/Documents/datamaps/input/datamap.csv")
dmlData := *d
// Test Key values
if dmlData[0].Key != "Project/Programme Name" {
t.Errorf("dmlData[0].Key = %s; want Project/Programme Name", dmlData[0].Key)
}
if dmlData[1].Key != "Department" {
t.Errorf("dmlData[1].Key = %s; want Department (without a space)", dmlData[1].Key)
}
if dmlData[2].Key != "Delivery Body" {
t.Errorf("dmlData[2].Key = %s; want Delivery Body (without a space)", dmlData[2].Key)
}
// Test Sheet values
if dmlData[0].Sheet != "Introduction" {
t.Errorf("dmlData[0].Sheet = %s; want Introduction", dmlData[0].Key)
}
}
|