Search in sources :

Example 6 with KnowledgeBase

use of com.google.cloud.dialogflow.v2.KnowledgeBase in project java-dialogflow by googleapis.

the class CreateKnowledgeBaseTest method testCreateKnowledgeBase.

@Test
public void testCreateKnowledgeBase() throws Exception {
    KnowledgeBase knowledgeBase = KnowledgeBaseManagement.createKnowledgeBase(PROJECT_ID, KNOWLEDGE_DISPLAY_NAME);
    knowledgeBaseName = knowledgeBase.getName();
    String got = bout.toString();
    assertThat(got).contains(KNOWLEDGE_DISPLAY_NAME);
}
Also used : KnowledgeBase(com.google.cloud.dialogflow.v2beta1.KnowledgeBase) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)4 ListKnowledgeBasesPagedResponse (com.google.cloud.dialogflow.v2.KnowledgeBasesClient.ListKnowledgeBasesPagedResponse)3 AbstractMessage (com.google.protobuf.AbstractMessage)3 KnowledgeBase (com.google.cloud.dialogflow.v2beta1.KnowledgeBase)2 KnowledgeBase (com.google.cloud.dialogflow.v2.KnowledgeBase)1 KnowledgeBasesClient (com.google.cloud.dialogflow.v2.KnowledgeBasesClient)1 LocationName (com.google.cloud.dialogflow.v2.LocationName)1 KnowledgeBasesClient (com.google.cloud.dialogflow.v2beta1.KnowledgeBasesClient)1 ProjectName (com.google.cloud.dialogflow.v2beta1.ProjectName)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 PrintStream (java.io.PrintStream)1 Before (org.junit.Before)1