llowinge commented on code in PR #15700:
URL: https://github.com/apache/camel/pull/15700#discussion_r1776470859


##########
components/camel-smb/src/test/java/org/apache/camel/component/smb/SmbComponentConnectionIT.java:
##########
@@ -0,0 +1,79 @@
+/*
+ * 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.camel.component.smb;
+
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+import com.hierynomus.smbj.SmbConfig;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.infra.smb.services.SmbService;
+import org.apache.camel.test.infra.smb.services.SmbServiceFactory;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SmbComponentConnectionIT extends CamelTestSupport {
+    private static final Logger LOG = 
LoggerFactory.getLogger(SmbComponentIT.class);
+
+    @RegisterExtension
+    public static SmbService service = SmbServiceFactory.createService();
+
+    @EndpointInject("mock:result")
+    protected MockEndpoint mockResultEndpoint;
+
+    @Test
+    public void testSmbRead() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(100);
+
+        mock.assertIsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            private void process(Exchange exchange) throws IOException {
+                final byte[] data = 
exchange.getMessage().getBody(byte[].class);
+                final String filePath = 
exchange.getMessage().getHeader(SmbConstants.SMB_FILE_PATH, String.class);

Review Comment:
   @orpiske Could you add this to the example in the docs ? I have a feeling it 
still fits under the "absolute basic" scenario and user would like to see which 
file is being consumed.



-- 
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: commits-unsubscr...@camel.apache.org

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

Reply via email to