public static TestCasePart[] GenerateAttributes() { // Initializations int numAttributes = HREF_TEMPLATES.Length * URIS.Length + HREF_TEMPLATES.Length * FORMAT_EXCEPTION_URIS.Length; TestCasePart[] parts = new TestCasePart[numAttributes]; // Generation int counter = 0; for (int i = 0; i < HREF_TEMPLATES.Length; i++) { // Good Uris for (int j = 0; j < URIS.Length; j++) { parts[counter] = new TestCasePart( string.Format(HREF_TEMPLATES[i], URIS[j]) , URIS[j] , IsCorrectScheme(URIS[j]) ); counter++; } // Bad Uris for (int j = 0; j < FORMAT_EXCEPTION_URIS.Length; j++) { parts[counter] = new TestCasePart( string.Format(HREF_TEMPLATES[i], FORMAT_EXCEPTION_URIS[j]) , FORMAT_EXCEPTION_URIS[j] , IsCorrectScheme(FORMAT_EXCEPTION_URIS[j]) ); counter++; } } return(parts); }
public static TestCasePart[] GenerateAttributes() { // Initializations int numAttributes = HREF_TEMPLATES.Length * URIS.Length + HREF_TEMPLATES.Length * FORMAT_EXCEPTION_URIS.Length; TestCasePart[] parts = new TestCasePart[numAttributes]; // Generation int counter = 0; for (int i = 0; i < HREF_TEMPLATES.Length; i++) { // Good Uris for (int j = 0; j < URIS.Length; j++) { parts[counter] = new TestCasePart( string.Format(HREF_TEMPLATES[i], URIS[j]) , URIS[j] , IsCorrectScheme(URIS[j]) ); counter++; } // Bad Uris for (int j = 0; j < FORMAT_EXCEPTION_URIS.Length; j++) { parts[counter] = new TestCasePart( string.Format(HREF_TEMPLATES[i], FORMAT_EXCEPTION_URIS[j]) , FORMAT_EXCEPTION_URIS[j] , IsCorrectScheme(FORMAT_EXCEPTION_URIS[j]) ); counter++; } } return parts; }