Skip to content

Commit d410915

Browse files
LPD-54423 Inline
1 parent add3df0 commit d410915

File tree

1 file changed

+22
-32
lines changed
  • modules/apps/headless/headless-admin-taxonomy/headless-admin-taxonomy-test/src/testIntegration/java/com/liferay/headless/admin/taxonomy/resource/v1_0/test

1 file changed

+22
-32
lines changed

modules/apps/headless/headless-admin-taxonomy/headless-admin-taxonomy-test/src/testIntegration/java/com/liferay/headless/admin/taxonomy/resource/v1_0/test/TaxonomyCategoryResourceTest.java

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,28 @@ public void testGetTaxonomyVocabularyTaxonomyCategoryByExternalReferenceCode()
194194
@Override
195195
@Test
196196
public void testGraphQLPostSiteTaxonomyCategory() throws Exception {
197-
TaxonomyCategory randomTaxonomyCategory =
198-
_testGraphQLPostSiteTaxonomyCategory_addTaxonomyCategory();
197+
TaxonomyCategory randomTaxonomyCategory = randomTaxonomyCategory();
198+
199+
TaxonomyCategory parentTaxonomyCategory =
200+
testGetSiteTaxonomyCategoryByExternalReferenceCode_addTaxonomyCategory();
201+
202+
randomTaxonomyCategory.setParentTaxonomyCategory(
203+
new ParentTaxonomyCategory() {
204+
{
205+
externalReferenceCode =
206+
parentTaxonomyCategory.getExternalReferenceCode();
207+
id = Long.valueOf(parentTaxonomyCategory.getId());
208+
}
209+
});
210+
211+
randomTaxonomyCategory.setParentTaxonomyVocabulary(
212+
new ParentTaxonomyVocabulary() {
213+
{
214+
externalReferenceCode =
215+
_assetVocabulary.getExternalReferenceCode();
216+
id = _assetVocabulary.getVocabularyId();
217+
}
218+
});
199219

200220
TaxonomyCategory taxonomyCategory =
201221
testGraphQLTaxonomyCategory_addTaxonomyCategory(
@@ -873,36 +893,6 @@ private void _testGetTaxonomyVocabularyTaxonomyCategoriesPageFlatten(
873893
taxonomyCategory1.getId());
874894
}
875895

876-
private TaxonomyCategory
877-
_testGraphQLPostSiteTaxonomyCategory_addTaxonomyCategory()
878-
throws Exception {
879-
880-
TaxonomyCategory taxonomyCategory = randomTaxonomyCategory();
881-
882-
TaxonomyCategory parentTaxonomyCategory =
883-
testGetSiteTaxonomyCategoryByExternalReferenceCode_addTaxonomyCategory();
884-
885-
taxonomyCategory.setParentTaxonomyCategory(
886-
new ParentTaxonomyCategory() {
887-
{
888-
externalReferenceCode =
889-
parentTaxonomyCategory.getExternalReferenceCode();
890-
id = Long.valueOf(parentTaxonomyCategory.getId());
891-
}
892-
});
893-
894-
taxonomyCategory.setParentTaxonomyVocabulary(
895-
new ParentTaxonomyVocabulary() {
896-
{
897-
externalReferenceCode =
898-
_assetVocabulary.getExternalReferenceCode();
899-
id = _assetVocabulary.getVocabularyId();
900-
}
901-
});
902-
903-
return taxonomyCategory;
904-
}
905-
906896
private void _testPatchTaxonomyCategoryWithExistingParentTaxonomyCategory(
907897
TaxonomyCategory taxonomyCategory, AssetVocabulary assetVocabulary)
908898
throws Exception {

0 commit comments

Comments
 (0)