public IEnumerator TestGetClassificationsModel() { Log.Debug("NaturalLanguageUnderstandingServiceV1IntegrationTests", "Attempting to GetSentimentModel..."); ClassificationsModel createClassificationsModelResponse = null; string modelId = ""; service.CreateClassificationsModel( callback: (DetailedResponse <ClassificationsModel> response, IBMError error) => { Log.Debug("NaturalLanguageUnderstandingServiceV1IntegrationTests", "ClassificationsModel result: {0}", response.Response); createClassificationsModelResponse = response.Result; Assert.IsNotNull(createClassificationsModelResponse); Assert.AreEqual(createClassificationsModelResponse.Name, "testString"); Assert.AreEqual(createClassificationsModelResponse.Language, "en"); Assert.AreEqual(createClassificationsModelResponse.Description, "testString"); Assert.AreEqual(createClassificationsModelResponse.ModelVersion, "testString"); Assert.AreEqual(createClassificationsModelResponse.VersionDescription, "testString"); Assert.IsNull(error); modelId = createClassificationsModelResponse.ModelId; }, language: "en", trainingData: classificationModelTrainingData, name: "testString", description: "testString", modelVersion: "testString", versionDescription: "testString", trainingDataContentType: "application/json" ); while (createClassificationsModelResponse == null) { yield return(null); } ClassificationsModel getClassificationsModel = null; service.GetClassificationsModel( callback: (DetailedResponse <ClassificationsModel> response, IBMError error) => { Log.Debug("NaturalLanguageUnderstandingServiceV1IntegrationTests", "GetClassificationsModel result: {0}", response.Response); getClassificationsModel = response.Result; Assert.IsNotNull(getClassificationsModel); Assert.IsNotNull(getClassificationsModel); Assert.AreEqual(getClassificationsModel.Name, "testString"); Assert.AreEqual(getClassificationsModel.Language, "en"); Assert.AreEqual(getClassificationsModel.Description, "testString"); Assert.AreEqual(getClassificationsModel.ModelVersion, "testString"); Assert.AreEqual(getClassificationsModel.VersionDescription, "testString"); Assert.IsNull(error); }, modelId: modelId ); while (getClassificationsModel == null) { yield return(null); } DeleteModelResults deleteModelResults = null; service.DeleteClassificationsModel( callback: (DetailedResponse <DeleteModelResults> response, IBMError error) => { Log.Debug("NaturalLanguageUnderstandingServiceV1IntegrationTests", "DeleteClassificationsModel result: {0}", response.Response); deleteModelResults = response.Result; Assert.IsNull(error); }, modelId: modelId ); while (deleteModelResults == null) { yield return(null); } }