Skip to content

Commit

Permalink
Amend OAuthClientIDTests
Browse files Browse the repository at this point in the history
Not sure why, but I could not compile until I make these changes to allow the test to see internal classes and fields.

Obviously I did not want to modify the ClientID.cs file as that has already caused us enough trouble.
  • Loading branch information
richardbuckle committed Mar 4, 2024
1 parent 706f05e commit 7cf975d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Tests/OAuthClientIDTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ public class OAuthClientIDTests
[TestMethod, TestCategory("Credentials")]
public void TestClientIDNotNull()
{
string ID = EddiCompanionAppService.ClientId.ID;
Assert.IsNotNull(ID);
var clientIDClass = new PrivateType(typeof(EddiCompanionAppService.ClientId));
object clientID = clientIDClass.GetStaticField("ID");
Assert.IsInstanceOfType(clientID, typeof(string));
Assert.IsNotNull( clientID );
}
}
}

0 comments on commit 7cf975d

Please sign in to comment.