Ejemplo n.º 1
0
    public static void Validate_Throws_If_UserInformationEndpoint_Not_Set()
    {
        // Arrange
        var options = new MoodleAuthenticationOptions()
        {
            AuthorizationEndpoint = "https://moodle.local",
            ClientId      = "ClientId",
            ClientSecret  = "ClientSecret",
            TokenEndpoint = "https://moodle.local",
        };

        // Act and Assert
        Assert.Throws <ArgumentException>("UserInformationEndpoint", () => options.Validate());
    }
Ejemplo n.º 2
0
    public static void Validate_Does_Not_Throw_If_Uris_Are_Valid()
    {
        // Arrange
        var options = new MoodleAuthenticationOptions()
        {
            AuthorizationEndpoint = "https://moodle.local",
            ClientId                = "ClientId",
            ClientSecret            = "ClientSecret",
            TokenEndpoint           = "https://moodle.local",
            UserInformationEndpoint = "https://moodle.local",
        };

        // Act (no Assert)
        options.Validate();
    }