Beispiel #1
0
        public void ParametersContainError_NoError_ErrorMessageEmpty()
        {
            LearningLayersOidcProvider  lloidc             = new LearningLayersOidcProvider();
            Dictionary <string, string> redirectParameters = new Dictionary <string, string>();

            bool res = lloidc.ParametersContainError(redirectParameters, out string message);

            Assert.IsEmpty(message);
        }
Beispiel #2
0
        public void ParametersContainError_ErrorGiven_ReturnsTrue()
        {
            LearningLayersOidcProvider  lloidc             = new LearningLayersOidcProvider();
            Dictionary <string, string> redirectParameters = new Dictionary <string, string>();

            redirectParameters.Add("error", "This is a simulated error");

            bool res = lloidc.ParametersContainError(redirectParameters, out string message);

            Assert.IsTrue(res);
        }
Beispiel #3
0
        public void ParametersContainError_ErrorGiven_ErrorMessageSet()
        {
            LearningLayersOidcProvider  lloidc             = new LearningLayersOidcProvider();
            Dictionary <string, string> redirectParameters = new Dictionary <string, string>();
            string errorMsg = "This is a simulated error";

            redirectParameters.Add("error", errorMsg);

            bool res = lloidc.ParametersContainError(redirectParameters, out string message);

            Assert.AreEqual(errorMsg, message);
        }