Examples of duplicateFavorites()


Examples of org.gradle.gradleplugin.foundation.favorites.FavoritesEditor.duplicateFavorites()

        List<FavoriteTask> tasksToCopy = new ArrayList<FavoriteTask>();
        tasksToCopy.add( favoriteTask1 );
        tasksToCopy.add( favoriteTask2 );

        //now peform the duplication
        editor.duplicateFavorites( tasksToCopy );

        //there should be 5 tasks now
        Assert.assertEquals( 5, editor.getFavoriteTasks().size() );

        //the 4th one (3 from index 0) should be the same as the first one
View Full Code Here

Examples of org.gradle.gradleplugin.foundation.favorites.FavoritesEditor.duplicateFavorites()

        List<FavoriteTask> tasksToCopy = new ArrayList<FavoriteTask>();
        tasksToCopy.add(favoriteTask1);
        tasksToCopy.add(favoriteTask2);

        //now perform the duplication
        editor.duplicateFavorites(tasksToCopy, new TestEditFavoriteInteraction(new NameAndCommand("newname1", "newcommand1"),
                new NameAndCommand("newname2", "newcommand2")));

        //there should be 5 tasks now
        Assert.assertEquals(5, editor.getFavoriteTasks().size());
View Full Code Here

Examples of org.gradle.gradleplugin.foundation.favorites.FavoritesEditor.duplicateFavorites()

        List<FavoriteTask> tasksToCopy = new ArrayList<FavoriteTask>();
        tasksToCopy.add(favoriteTask1);
        tasksToCopy.add(favoriteTask2);

        //now perform the duplication, we only pass in one NameAndCommand but we're editing 2. This makes it cancel the second one.
        editor.duplicateFavorites(tasksToCopy, new TestEditFavoriteInteraction(new NameAndCommand("newname1", "newcommand1")));

        //there should be 4 tasks now
        Assert.assertNotSame("Failed to cancel", 5, editor.getFavoriteTasks().size()); //this just provides a better error if this fails to cancel
        Assert.assertEquals(4, editor.getFavoriteTasks().size());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.