You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/08/11 02:47:48 UTC

[GitHub] [incubator-linkis] binbinCheng commented on a diff in pull request #2678: [ISSUES-2677]Add ResourceServiceImplTest unit test

binbinCheng commented on code in PR #2678:
URL: https://github.com/apache/incubator-linkis/pull/2678#discussion_r943057717


##########
linkis-public-enhancements/linkis-bml/linkis-bml-server/src/test/java/org/apache/linkis/bml/service/ResourceServiceImplTest.java:
##########
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.linkis.bml.service;
+
+import org.apache.linkis.bml.dao.ResourceDao;
+import org.apache.linkis.bml.dao.VersionDao;
+import org.apache.linkis.bml.entity.Resource;
+import org.apache.linkis.bml.entity.ResourceVersion;
+import org.apache.linkis.bml.service.impl.ResourceServiceImpl;
+
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import java.util.*;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/** ResourceServiceImpl Tester */
+@ExtendWith(MockitoExtension.class)
+public class ResourceServiceImplTest {
+
+    @InjectMocks private ResourceServiceImpl resourceServiceImpl;
+
+    @Mock private ResourceDao resourceDao;
+
+    @Mock private VersionDao versionDao;
+
+    @BeforeEach
+    @DisplayName("Each unit test method is executed once before execution")
+    public void before() throws Exception {}
+
+    @AfterEach
+    @DisplayName("Each unit test method is executed once before execution")
+    public void after() throws Exception {}
+
+    Resource addResource() {

Review Comment:
   ok



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org