diff options
author | Ian Ling <ian@iancaling.com> | 2022-04-08 08:52:57 -0700 |
---|---|---|
committer | Ian Ling <ian@iancaling.com> | 2022-04-25 15:00:47 -0700 |
commit | 460cf54ece7eba418c50407ee35544c5d63588a7 (patch) | |
tree | 07ec7aaf51a92a1ae209e540f45241f990561919 /rdfloader/parser2v2/parse_creation_info_test.go | |
parent | fa24fac85dd550a3f815896241081a1246810d2c (diff) | |
download | spdx-tools-460cf54ece7eba418c50407ee35544c5d63588a7.tar.gz |
Overhaul structs, refactor JSON parser and saver
Signed-off-by: Ian Ling <ian@iancaling.com>
Diffstat (limited to 'rdfloader/parser2v2/parse_creation_info_test.go')
-rw-r--r-- | rdfloader/parser2v2/parse_creation_info_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rdfloader/parser2v2/parse_creation_info_test.go b/rdfloader/parser2v2/parse_creation_info_test.go index 9ea62d9..415d18e 100644 --- a/rdfloader/parser2v2/parse_creation_info_test.go +++ b/rdfloader/parser2v2/parse_creation_info_test.go @@ -29,12 +29,12 @@ func Test_setCreator(t *testing.T) { if err != nil { t.Errorf("error parsing a valid input: %v", err) } - if len(ci.CreatorPersons) != 1 { - t.Errorf("creationInfo should've had 1 creatorPersons, found %d", len(ci.CreatorPersons)) + if len(ci.Creators) != 1 { + t.Errorf("creationInfo should've had 1 creatorPersons, found %d", len(ci.Creators)) } expectedPerson := "Jane Doe" - if ci.CreatorPersons[0] != expectedPerson { - t.Errorf("expected %s, found %s", expectedPerson, ci.CreatorPersons[0]) + if ci.Creators[0].Creator != expectedPerson { + t.Errorf("expected %s, found %s", expectedPerson, ci.Creators[0]) } } @@ -88,12 +88,12 @@ func Test_rdfParser2_2_parseCreationInfoFromNode(t *testing.T) { if ci.LicenseListVersion != "2.6" { t.Errorf(`expected %s, found %s`, "2.6", ci.LicenseListVersion) } - n := len(ci.CreatorPersons) + n := len(ci.Creators) if n != 1 { t.Errorf("expected 1 creatorPersons, found %d", n) } - if ci.CreatorPersons[0] != "fossy" { - t.Errorf("expected %s, found %s", "fossy", ci.CreatorPersons[0]) + if ci.Creators[0].Creator != "fossy" { + t.Errorf("expected %s, found %s", "fossy", ci.Creators[0].Creator) } expectedCreated := "2018-08-24T19:55:34Z" if ci.Created != expectedCreated { |