JaroslavTulach commented on a change in pull request #2895: URL: https://github.com/apache/netbeans/pull/2895#discussion_r614684396
########## File path: extide/gradle/test/unit/src/org/netbeans/modules/gradle/GradleModuleFileCache21Test.java ########## @@ -0,0 +1,60 @@ +/* + * 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.netbeans.modules.gradle; + +import org.netbeans.junit.NbTestCase; + +/** + * + * @author sdedic + */ +public class GradleModuleFileCache21Test extends NbTestCase { + + public GradleModuleFileCache21Test(String name) { + super(name); + } + + /** + * Checks GAV split with regular fixed versions. + */ + public void testGavSplitFixedVersion() throws Exception { + String[] parts = GradleModuleFileCache21.gavSplit("io.micronaut:micronaut-core:2.3.4"); // NOI18N + assertEquals(parts[0], "io.micronaut"); // NOI18N + assertEquals(parts[1], "micronaut-core"); // NOI18N + assertEquals(parts[2], "2.3.4"); // NOI18N + } + + /** + * Checks GAV split with -SNAPSHOT and a maven-like timestamp/sequence as the + * snapshot unique id. + */ + public void testGavSplitFixedSnapshotWithMavenTimestamp() throws Exception { Review comment: Good! Btw. I think I had similar problem in Maven. When a really large project ([bck2brwsr](http://github.com/jtulach/bck2brwsr) in my case) was just partially rebuilt, it started to download these _dated_ artifacts from snapshot repository. Then `classpath` was full of _dated_ artifacts and Bck2Brwsr had problems with it (as it takes JARs from classpath and generates `.js` files along them) - the names of JARs were suddenly different to what one normally expected. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
