Пример #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);
        }
Пример #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);
        }
Пример #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);
        }