Ejemplo n.º 1
0
        public override IEnumerator RunTest()
        {
            string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";

            if (Utilities.Config.Instance.FindCredentials(m_personalityInsights.GetServiceID()) == null)
            {
                yield break;
            }

            Log.Debug("TestPersonalityInsightsV2", "Attempting GetProfile using Text!");
            m_personalityInsights.GetProfile(OnGetProfileText, testString);
            while (!m_GetProfileTextTested)
            {
                yield return(null);
            }

            Log.Debug("TestPersonalityInsightsV2", "Attempting GetProfile using Json!");
            m_personalityInsights.GetProfile(OnGetProfileJson, dataPath);
            while (!m_GetProfileJsonTested)
            {
                yield return(null);
            }

            yield break;
        }
        public override IEnumerator RunTest()
        {
            string dataPath = Application.dataPath + "/Watson/Examples/ServiceExamples/TestData/personalityInsights.json";

            if (Utilities.Config.Instance.FindCredentials(m_personalityInsights.GetServiceID()) == null)
            {
                yield break;
            }

            Log.Debug("TestPersonalityInsightsV3", "Attempting GetProfile using Text!");
            m_personalityInsights.GetProfile(OnGetProfileText, testString, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true);
            while (!m_GetProfileTextTested)
            {
                yield return(null);
            }

            Log.Debug("TestPersonalityInsightsV3", "Attempting GetProfile using Json!");
            m_personalityInsights.GetProfile(OnGetProfileJson, dataPath, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true);
            while (!m_GetProfileJsonTested)
            {
                yield return(null);
            }

            yield break;
        }