@@ -45,15 +45,15 @@ public void Spdx2JsonDeserializer_Deserialize_ValidSpdx22JsonReturnsExpectedDocu
4545 doc . Validate ( issues ) ;
4646
4747 // Assert: Verify that there are no validation issues
48- Assert . AreEqual ( 0 , issues . Count ) ;
48+ Assert . IsEmpty ( issues ) ;
4949
5050 // Assert: Verify the document properties
5151 Assert . AreEqual ( "SPDX-Tools-v2.0" , doc . Name ) ;
5252 Assert . AreEqual ( "SPDX-2.2" , doc . Version ) ;
5353 Assert . AreEqual ( "http://spdx.org/spdxdocs/spdx-example-json-2.2-444504E0-4F89-41D3-9A0C-0305E82C3301" ,
5454 doc . DocumentNamespace ) ;
5555 Assert . AreEqual ( "This document was created using SPDX 2.0 using licenses from the web site." , doc . Comment ) ;
56- Assert . AreEqual ( 3 , doc . CreationInformation . Creators . Length ) ;
56+ Assert . HasCount ( 3 , doc . CreationInformation . Creators ) ;
5757 Assert . AreEqual ( "Tool: LicenseFind-1.0" , doc . CreationInformation . Creators [ 0 ] ) ;
5858 Assert . AreEqual ( "Organization: ExampleCodeInspect ()" , doc . CreationInformation . Creators [ 1 ] ) ;
5959 Assert . AreEqual ( "Person: Jane Doe ()" , doc . CreationInformation . Creators [ 2 ] ) ;
@@ -62,15 +62,15 @@ public void Spdx2JsonDeserializer_Deserialize_ValidSpdx22JsonReturnsExpectedDocu
6262 Assert . AreEqual ( "3.9" , doc . CreationInformation . LicenseListVersion ) ;
6363
6464 // Assert: Verify external document references
65- Assert . AreEqual ( 1 , doc . ExternalDocumentReferences . Length ) ;
65+ Assert . HasCount ( 1 , doc . ExternalDocumentReferences ) ;
6666 Assert . AreEqual ( "DocumentRef-spdx-tool-1.2" , doc . ExternalDocumentReferences [ 0 ] . ExternalDocumentId ) ;
6767 Assert . AreEqual ( SpdxChecksumAlgorithm . Sha1 , doc . ExternalDocumentReferences [ 0 ] . Checksum . Algorithm ) ;
6868 Assert . AreEqual ( "d6a770ba38583ed4bb4525bd96e50461655d2759" , doc . ExternalDocumentReferences [ 0 ] . Checksum . Value ) ;
6969 Assert . AreEqual ( "http://spdx.org/spdxdocs/spdx-tools-v1.2-3F2504E0-4F89-41D3-9A0C-0305E82C3301" ,
7070 doc . ExternalDocumentReferences [ 0 ] . Document ) ;
7171
7272 // Assert: Verify extracted licensing info
73- Assert . AreEqual ( 5 , doc . ExtractedLicensingInfo . Length ) ;
73+ Assert . HasCount ( 5 , doc . ExtractedLicensingInfo ) ;
7474 Assert . AreEqual ( "LicenseRef-Beerware-4.2" , doc . ExtractedLicensingInfo [ 0 ] . LicenseId ) ;
7575 StringAssert . StartsWith ( doc . ExtractedLicensingInfo [ 0 ] . ExtractedText , "\" THE BEER-WARE LICENSE\" " ) ;
7676 Assert . AreEqual ( "LicenseRef-4" , doc . ExtractedLicensingInfo [ 1 ] . LicenseId ) ;
@@ -79,7 +79,7 @@ public void Spdx2JsonDeserializer_Deserialize_ValidSpdx22JsonReturnsExpectedDocu
7979 Assert . AreEqual ( "LicenseRef-3" , doc . ExtractedLicensingInfo [ 2 ] . LicenseId ) ;
8080 StringAssert . StartsWith ( doc . ExtractedLicensingInfo [ 2 ] . ExtractedText , "The CyberNeko Software License" ) ;
8181 Assert . AreEqual ( "CyberNeko License" , doc . ExtractedLicensingInfo [ 2 ] . Name ) ;
82- Assert . AreEqual ( 2 , doc . ExtractedLicensingInfo [ 2 ] . CrossReferences . Length ) ;
82+ Assert . HasCount ( 2 , doc . ExtractedLicensingInfo [ 2 ] . CrossReferences ) ;
8383 Assert . AreEqual ( "http://people.apache.org/~andyc/neko/LICENSE" ,
8484 doc . ExtractedLicensingInfo [ 2 ] . CrossReferences [ 0 ] ) ;
8585 Assert . AreEqual ( "http://justasample.url.com" , doc . ExtractedLicensingInfo [ 2 ] . CrossReferences [ 1 ] ) ;
@@ -90,7 +90,7 @@ public void Spdx2JsonDeserializer_Deserialize_ValidSpdx22JsonReturnsExpectedDocu
9090 StringAssert . StartsWith ( doc . ExtractedLicensingInfo [ 4 ] . ExtractedText , "/*\n * (c) Copyright 2000, 2001, 2002" ) ;
9191
9292 // Assert: Verify annotations
93- Assert . AreEqual ( 3 , doc . Annotations . Length ) ;
93+ Assert . HasCount ( 3 , doc . Annotations ) ;
9494 Assert . AreEqual ( "Person: Jane Doe ()" , doc . Annotations [ 0 ] . Annotator ) ;
9595 Assert . AreEqual ( "2010-01-29T18:30:22Z" , doc . Annotations [ 0 ] . Date ) ;
9696 Assert . AreEqual ( SpdxAnnotationType . Other , doc . Annotations [ 0 ] . Type ) ;
@@ -105,19 +105,19 @@ public void Spdx2JsonDeserializer_Deserialize_ValidSpdx22JsonReturnsExpectedDocu
105105 StringAssert . StartsWith ( doc . Annotations [ 2 ] . Comment , "This is just an example" ) ;
106106
107107 // Assert: Verify files
108- Assert . AreEqual ( 4 , doc . Files . Length ) ;
108+ Assert . HasCount ( 4 , doc . Files ) ;
109109 Assert . AreEqual ( "SPDXRef-DoapSource" , doc . Files [ 0 ] . Id ) ;
110110 Assert . AreEqual ( "./src/org/spdx/parser/DOAPProject.java" , doc . Files [ 0 ] . FileName ) ;
111- Assert . AreEqual ( 1 , doc . Files [ 0 ] . FileTypes . Length ) ;
111+ Assert . HasCount ( 1 , doc . Files [ 0 ] . FileTypes ) ;
112112 Assert . IsTrue ( doc . Files [ 0 ] . FileTypes . Contains ( SpdxFileType . Source ) ) ;
113- Assert . AreEqual ( 1 , doc . Files [ 0 ] . Checksums . Length ) ;
113+ Assert . HasCount ( 1 , doc . Files [ 0 ] . Checksums ) ;
114114 Assert . AreEqual ( SpdxChecksumAlgorithm . Sha1 , doc . Files [ 0 ] . Checksums [ 0 ] . Algorithm ) ;
115115 Assert . AreEqual ( "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12" , doc . Files [ 0 ] . Checksums [ 0 ] . Value ) ;
116116 Assert . AreEqual ( "Apache-2.0" , doc . Files [ 0 ] . ConcludedLicense ) ;
117- Assert . AreEqual ( 1 , doc . Files [ 0 ] . LicenseInfoInFiles . Length ) ;
117+ Assert . HasCount ( 1 , doc . Files [ 0 ] . LicenseInfoInFiles ) ;
118118 Assert . AreEqual ( "Apache-2.0" , doc . Files [ 0 ] . LicenseInfoInFiles [ 0 ] ) ;
119119 Assert . AreEqual ( "Copyright 2010, 2011 Source Auditor Inc." , doc . Files [ 0 ] . CopyrightText ) ;
120- Assert . AreEqual ( 5 , doc . Files [ 0 ] . Contributors . Length ) ;
120+ Assert . HasCount ( 5 , doc . Files [ 0 ] . Contributors ) ;
121121 Assert . AreEqual ( "Protecode Inc." , doc . Files [ 0 ] . Contributors [ 0 ] ) ;
122122 Assert . AreEqual ( "SPDX Technical Team Members" , doc . Files [ 0 ] . Contributors [ 1 ] ) ;
123123 Assert . AreEqual ( "Open Logic Inc." , doc . Files [ 0 ] . Contributors [ 2 ] ) ;
@@ -126,35 +126,35 @@ public void Spdx2JsonDeserializer_Deserialize_ValidSpdx22JsonReturnsExpectedDocu
126126 Assert . AreEqual ( "This file is used by Jena" , doc . Files [ 1 ] . Comment ) ;
127127 StringAssert . StartsWith ( doc . Files [ 1 ] . Notice , "Apache Commons Lang\n Copyright 2001-2011" ) ;
128128 Assert . AreEqual ( "This license is used by Jena" , doc . Files [ 2 ] . LicenseComments ) ;
129- Assert . AreEqual ( 1 , doc . Files [ 3 ] . Annotations . Length ) ;
129+ Assert . HasCount ( 1 , doc . Files [ 3 ] . Annotations ) ;
130130 Assert . AreEqual ( "Person: File Commenter" , doc . Files [ 3 ] . Annotations [ 0 ] . Annotator ) ;
131131 Assert . AreEqual ( "2011-01-29T18:30:22Z" , doc . Files [ 3 ] . Annotations [ 0 ] . Date ) ;
132132 Assert . AreEqual ( SpdxAnnotationType . Other , doc . Files [ 3 ] . Annotations [ 0 ] . Type ) ;
133133 Assert . AreEqual ( "File level annotation" , doc . Files [ 3 ] . Annotations [ 0 ] . Comment ) ;
134- Assert . AreEqual ( 2 , doc . Files [ 3 ] . Checksums . Length ) ;
134+ Assert . HasCount ( 2 , doc . Files [ 3 ] . Checksums ) ;
135135 Assert . AreEqual ( SpdxChecksumAlgorithm . Md5 , doc . Files [ 3 ] . Checksums [ 0 ] . Algorithm ) ;
136136 Assert . AreEqual ( "624c1abb3664f4b35547e7c73864ad24" , doc . Files [ 3 ] . Checksums [ 0 ] . Value ) ;
137137 Assert . AreEqual ( SpdxChecksumAlgorithm . Sha1 , doc . Files [ 3 ] . Checksums [ 1 ] . Algorithm ) ;
138138 Assert . AreEqual ( "d6a770ba38583ed4bb4525bd96e50461655d2758" , doc . Files [ 3 ] . Checksums [ 1 ] . Value ) ;
139139
140140 // Assert: Verify snippets
141- Assert . AreEqual ( 1 , doc . Snippets . Length ) ;
141+ Assert . HasCount ( 1 , doc . Snippets ) ;
142142 Assert . AreEqual ( "SPDXRef-Snippet" , doc . Snippets [ 0 ] . Id ) ;
143143 Assert . AreEqual ( "SPDXRef-DoapSource" , doc . Snippets [ 0 ] . SnippetFromFile ) ;
144144 Assert . AreEqual ( 310 , doc . Snippets [ 0 ] . SnippetByteStart ) ;
145145 Assert . AreEqual ( 420 , doc . Snippets [ 0 ] . SnippetByteEnd ) ;
146146 Assert . AreEqual ( 5 , doc . Snippets [ 0 ] . SnippetLineStart ) ;
147147 Assert . AreEqual ( 23 , doc . Snippets [ 0 ] . SnippetLineEnd ) ;
148148 Assert . AreEqual ( "GPL-2.0-only" , doc . Snippets [ 0 ] . ConcludedLicense ) ;
149- Assert . AreEqual ( 1 , doc . Snippets [ 0 ] . LicenseInfoInSnippet . Length ) ;
149+ Assert . HasCount ( 1 , doc . Snippets [ 0 ] . LicenseInfoInSnippet ) ;
150150 Assert . AreEqual ( "GPL-2.0-only" , doc . Snippets [ 0 ] . LicenseInfoInSnippet [ 0 ] ) ;
151151 StringAssert . StartsWith ( doc . Snippets [ 0 ] . LicenseComments , "The concluded license was taken" ) ;
152152 Assert . AreEqual ( "Copyright 2008-2010 John Smith" , doc . Snippets [ 0 ] . CopyrightText ) ;
153153 StringAssert . StartsWith ( doc . Snippets [ 0 ] . Comment , "This snippet was identified as significant" ) ;
154154 Assert . AreEqual ( "from linux kernel" , doc . Snippets [ 0 ] . Name ) ;
155155
156156 // Assert: Verify relationships
157- Assert . AreEqual ( 9 , doc . Relationships . Length ) ;
157+ Assert . HasCount ( 9 , doc . Relationships ) ;
158158 Assert . AreEqual ( "SPDXRef-DOCUMENT" , doc . Relationships [ 0 ] . Id ) ;
159159 Assert . AreEqual ( "SPDXRef-Package" , doc . Relationships [ 0 ] . RelatedSpdxElement ) ;
160160 Assert . AreEqual ( SpdxRelationshipType . Contains , doc . Relationships [ 0 ] . RelationshipType ) ;
0 commit comments