@@ -55,6 +55,8 @@ internal void TryParseGameIdentifierReturnsExpectedId(string input, EGameIdentif
5555 [ DataRow ( "unknown/123" , EGameIdentifier . Application ) ]
5656 [ DataRow ( "https://store.steampowered.com/bundle/123" , EGameIdentifier . Application ) ]
5757 [ DataRow ( "https://example.com/app/730" , EGameIdentifier . Application ) ]
58+ [ DataRow ( "regex/pattern" , EGameIdentifier . Application ) ]
59+ [ DataRow ( "name/Half-Life" , EGameIdentifier . Application ) ]
5860 [ TestMethod ]
5961 internal void TryParseGameIdentifierReturnsFalseForInvalidInput ( string input , EGameIdentifier defaultType ) {
6062 bool result = TryParseGameIdentifier ( input , defaultType , out EGameIdentifier ? type , out uint id ) ;
@@ -68,6 +70,7 @@ internal void TryParseGameIdentifierReturnsFalseForInvalidInput(string input, EG
6870 [ DataRow ( "r/test.*" , EGameIdentifier . Application , EGameIdentifier . Regex , "test.*" ) ]
6971 [ DataRow ( "name/Half-Life" , EGameIdentifier . Application , EGameIdentifier . Name , "Half-Life" ) ]
7072 [ DataRow ( "n/Portal" , EGameIdentifier . Application , EGameIdentifier . Name , "Portal" ) ]
73+ [ DataRow ( "http:CS2" , EGameIdentifier . Name , EGameIdentifier . Name , "http:CS2" ) ]
7174 [ TestMethod ]
7275 internal void TryParseGameIdentifierStringReturnsExpectedValue ( string input , EGameIdentifier defaultType , EGameIdentifier expectedType , string expectedValue ) {
7376 bool result = TryParseGameIdentifier ( input , defaultType , out EGameIdentifier ? type , out string ? value ) ;
@@ -76,16 +79,5 @@ internal void TryParseGameIdentifierStringReturnsExpectedValue(string input, EGa
7679 Assert . AreEqual ( expectedType , type ) ;
7780 Assert . AreEqual ( expectedValue , value ) ;
7881 }
79-
80- [ DataRow ( "regex/pattern" , EGameIdentifier . Application ) ]
81- [ DataRow ( "name/Half-Life" , EGameIdentifier . Application ) ]
82- [ TestMethod ]
83- internal void TryParseGameIdentifierUintReturnsFalseForNonNumericTypes ( string input , EGameIdentifier defaultType ) {
84- bool result = TryParseGameIdentifier ( input , defaultType , out EGameIdentifier ? type , out uint id ) ;
85-
86- Assert . IsFalse ( result ) ;
87- Assert . IsNull ( type ) ;
88- Assert . AreEqual ( 0U , id ) ;
89- }
9082}
9183#pragma warning restore CA1812 // False positive, the class is used during MSTest
0 commit comments