Beispiel #1
0
 public static void SetupClass(TestContext testContext)
 {
     IntrospectionT.UpsertPref(new Dictionary <Introspection.IntrospectionEntity, string>()
     {
         { Introspection.IntrospectionEntity.PDMPURL, "https://openid.logicoy.com/ilpdmp/test/getReport" },
     });
 }
        public void Introspection_Preference_Present()
        {
            IntrospectionT.UpsertPref(new Dictionary <Introspection.IntrospectionEntity, string>()
            {
                { Introspection.IntrospectionEntity.DentalXChangeDwsURL, "https://prelive2.dentalxchange.com/dws/DwsService" }
            });
            string retVal = Introspection.GetOverride(Introspection.IntrospectionEntity.DentalXChangeDwsURL, "thisIsADefaultURL");

            //The preference is present and valid. retVal should be overridden with the preference value.
            Assert.AreEqual("https://prelive2.dentalxchange.com/dws/DwsService", retVal);
        }
        public void Introspection_Preference_Malformed()
        {
            IntrospectionT.UpsertPref("INVALID JSON ValueString");
            string retVal = "";

            try {
                retVal = Introspection.GetOverride(Introspection.IntrospectionEntity.DentalXChangeDwsURL, "thisIsADefaultURL");
            }
            catch (ApplicationException) {
                //GetOverride() should throw an application exception if the json is malformed and retVal should never be set.
                Assert.IsTrue(retVal == "");
                return;
            }
            Assert.Fail();
        }