Examples of AssertionFailedError


Examples of junit.framework.AssertionFailedError

                        = "myrootproject:mysubproject1:mysubsubproject:lib";   //change the task's full name
                return true;
            }

            public void reportError(String error) {
                throw new AssertionFailedError("unexpected error: " + error);
            }
        });

        //make sure we were notified
        context.assertIsSatisfied();
View Full Code Here

Examples of junit.framework.AssertionFailedError

                favoriteTask.fullCommandLine = "nonexistanttask";   //change the task's full name
                return true;
            }

            public void reportError(String error) {
                throw new AssertionFailedError("unexpected error: " + error);
            }
        });

        //make sure we were notified
        context.assertIsSatisfied();

        //make sure the settings were changed
        favoriteTask = editor.getFavoriteTasks().get(0);
        Assert.assertEquals("newname", favoriteTask.getDisplayName());
        Assert.assertEquals("nonexistanttask", favoriteTask.getFullCommandLine());
        Assert.assertFalse(!favoriteTask.alwaysShowOutput());

        //now change the full name back. Make sure the task is changed back.

        //reset our expectations. We'll get notified again.
        context.checking(new Expectations() {{
            one(observer).favoritesChanged();
        }});

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "mysubproject1:compile";   //change the task's full name
                return true;
            }

            public void reportError(String error) {
                throw new AssertionFailedError("unexpected error: " + error);
            }
        });

        //make sure we were notified
        context.assertIsSatisfied();
View Full Code Here

Examples of junit.framework.AssertionFailedError

                favoriteTask.alwaysShowOutput = !favoriteTask.alwaysShowOutput;
                return false//return false to cancel!
            }

            public void reportError(String error) {
                throw new AssertionFailedError("unexpected error: " + error);
            }
        });

        //make sure nothing was changed
        favoriteTask = editor.getFavoriteTasks().get(0);
View Full Code Here

Examples of junit.framework.AssertionFailedError

                }
            } else {
                if (matcher != null) {
                    String message = String.format("Did not get expected failure in %s", thread);
                    LOGGER.error(message);
                    failures.add(new AssertionFailedError(message));
                } else {
                    LOGGER.debug("Finished {}", thread);
                }
            }
            condition.signalAll();
View Full Code Here

Examples of junit.framework.AssertionFailedError

        public void setExpectedOrder(FavoriteTask... expectedOrder) {
            this.expectedOrder = expectedOrder;
        }

        public void favoritesChanged() {
            throw new AssertionFailedError("Did not expect to get a favoritesChanged notification!");
        }
View Full Code Here

Examples of junit.framework.AssertionFailedError

        while (!expectedObjecsList.isEmpty()) {
            T expectedObject = expectedObjecsList.remove(0);

            if (!actualObjecs.contains(expectedObject)) {
                throw new AssertionFailedError(
                        "Failed to locate object. Sought object:\n" + expectedObject + "\n\nExpected:\n" + dumpList(
                                expectedObjects) + "\nActual:\n" + dumpList(actualObjecs));
        }
        }

        if (actualObjecs.size() != expectedObjects.size()) {
            throw new AssertionFailedError(
                    "Expected " + expectedObjects.size() + " items but found " + actualObjecs.size() + "\nExpected:\n"
                            + dumpList(expectedObjects) + "\nActual:\n" + dumpList(actualObjecs));
    }
    }
View Full Code Here

Examples of junit.framework.AssertionFailedError

        gradlePluginLord.removeRequestObserver( observer );

        if (!completed) //its still running. Something is wrong.
        {
            request.cancel(); //just to clean up after ourselves a little, cancel the request.
            throw new AssertionFailedError("Failed to complete refresh in alotted time: " + maximumWaitValue + " " + maximumWaitUnits + ". Considering this failed.");
        }
    }
View Full Code Here

Examples of junit.framework.AssertionFailedError

        gradlePluginLord.removeRequestObserver( observer );

        if (!isComplete.get()) //its still running. Something is wrong.
        {
            request.cancel(); //just to clean up after ourselves a little, cancel the request.
            throw new AssertionFailedError("Failed to comlete execution in alotted time: " + maximumWaitSeconds + " seconds. Considering this failed.");
        }
    }
View Full Code Here

Examples of junit.framework.AssertionFailedError

            this.confirmOverwrite = confirmOverwrite;
        }

        public File promptForFile(FileFilter fileFilters) {
            if (promptCount == 100) {
                throw new AssertionFailedError("Possible endless loop. PromptForFile has been called 100 times.");
            }

            promptCount++;
            return file;
        }
View Full Code Here

Examples of junit.framework.AssertionFailedError

        public boolean confirmOverwritingExisingFile(File file) {
            return confirmOverwrite;
        }

        public void reportError(String error) {
            throw new AssertionFailedError("Unexpected error: " + error);
        }
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.