Skip to content

Commit 934ffcc

Browse files
committed
test(language-translator-v3): update unit tests
1 parent afd1086 commit 934ffcc

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

language-translator/src/test/java/com/ibm/watson/language_translator/v3/LanguageTranslatorTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2019, 2022.
2+
* (C) Copyright IBM Corp. 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -355,7 +355,9 @@ public void testCreateModelWOptions() throws Throwable {
355355
new CreateModelOptions.Builder()
356356
.baseModelId("testString")
357357
.forcedGlossary(TestUtilities.createMockStream("This is a mock file."))
358+
.forcedGlossaryContentType("application/x-tmx+xml")
358359
.parallelCorpus(TestUtilities.createMockStream("This is a mock file."))
360+
.parallelCorpusContentType("application/x-tmx+xml")
359361
.name("testString")
360362
.build();
361363

language-translator/src/test/java/com/ibm/watson/language_translator/v3/model/CreateModelOptionsTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* (C) Copyright IBM Corp. 2020.
2+
* (C) Copyright IBM Corp. 2022.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
55
* the License. You may obtain a copy of the License at
@@ -35,16 +35,20 @@ public void testCreateModelOptions() throws Throwable {
3535
new CreateModelOptions.Builder()
3636
.baseModelId("testString")
3737
.forcedGlossary(TestUtilities.createMockStream("This is a mock file."))
38+
.forcedGlossaryContentType("application/x-tmx+xml")
3839
.parallelCorpus(TestUtilities.createMockStream("This is a mock file."))
40+
.parallelCorpusContentType("application/x-tmx+xml")
3941
.name("testString")
4042
.build();
4143
assertEquals(createModelOptionsModel.baseModelId(), "testString");
4244
assertEquals(
4345
IOUtils.toString(createModelOptionsModel.forcedGlossary()),
4446
IOUtils.toString(TestUtilities.createMockStream("This is a mock file.")));
47+
assertEquals(createModelOptionsModel.forcedGlossaryContentType(), "application/x-tmx+xml");
4548
assertEquals(
4649
IOUtils.toString(createModelOptionsModel.parallelCorpus()),
4750
IOUtils.toString(TestUtilities.createMockStream("This is a mock file.")));
51+
assertEquals(createModelOptionsModel.parallelCorpusContentType(), "application/x-tmx+xml");
4852
assertEquals(createModelOptionsModel.name(), "testString");
4953
}
5054

0 commit comments

Comments
 (0)