Examples of TestAnnotations


Examples of net.thucydides.core.annotations.TestAnnotations

                                 java.lang.reflect.Type typeOfSrc,
                                 JsonSerializationContext context) {
        JsonObject jsonObject = new JsonObject();
        jsonObject.add(CLASSNAME, new JsonPrimitive(src.getName()));
        JsonArray issuesJsonArray = new JsonArray();
        TestAnnotations testAnnotationsForClass = TestAnnotations.forClass(src);
        String[] annotatedIssuesForTestCase = testAnnotationsForClass.getAnnotatedIssuesForTestCase(src);
        addIssuesToCollectingJsonArray(issuesJsonArray, annotatedIssuesForTestCase);
        String annotatedIssueForTestCase = testAnnotationsForClass.getAnnotatedIssueForTestCase(src);
        if (annotatedIssueForTestCase != null) {
            issuesJsonArray.add(new JsonPrimitive(annotatedIssueForTestCase));
        }
        for (Method currentMethod : src.getMethods()) {
            String[] annotatedIssuesForMethod = testAnnotationsForClass
                    .getAnnotatedIssuesForMethod(currentMethod.getName());
            addIssuesToCollectingJsonArray(issuesJsonArray,
                    annotatedIssuesForMethod);
            Optional<String> annotatedIssueForMethod = testAnnotationsForClass
                    .getAnnotatedIssueForMethod(currentMethod.getName());
            if (annotatedIssueForMethod.isPresent()) {
                issuesJsonArray.add(new JsonPrimitive(
                        annotatedIssueForMethod.get()));
            }
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

     *
     */
    @Test
    public void testGetPluginClassOfP() {
        final PluginInformation pi = this.pm.getPlugin(PluginInformation.class);
        final TestAnnotations ta = this.pm.getPlugin(TestAnnotations.class);

        Assert.assertNotNull(ta);
        Collection<String> information = pi.getInformation(Information.CAPABILITIES, ta);
        Assert.assertNotNull(information);
        Assert.assertTrue(information.size() > 0);
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

    public void testGetPluginClassOfP() {
        Assert.assertNotNull("Pluginmanager must be there", this.pm);

        this.pm.addPluginsFrom(new File("tests/plugins/").toURI(), new OptionReportAfter());

        final TestAnnotations p1 = this.pm.getPlugin(TestAnnotations.class);
        final PluginInformation p2 = this.pm.getPlugin(PluginInformation.class);

        $(p2.getInformation(Information.CLASSPATH_ORIGIN, p1)).string().print();
    }
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

     *
     */
    @Test
    public void testGetPluginClassOfP() {
        final PluginInformation pi = this.pm.getPlugin(PluginInformation.class);
        final TestAnnotations ta = this.pm.getPlugin(TestAnnotations.class);
    }
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

     */
    @Test
    public void testShutdown() {
        Assert.assertNotNull(this.pm);

        TestAnnotations plugin = this.pm.getPlugin(TestAnnotations.class);

        Assert.assertNotNull(plugin);
        this.pm.shutdown();
        plugin = this.pm.getPlugin(TestAnnotations.class);
        Assert.assertNull(plugin);
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

     */
    @Test
    public void testPluginInformation() {
        Assert.assertNotNull(this.pm);

        final TestAnnotations ta = this.pm.getPlugin(TestAnnotations.class);
        final PluginInformation pi = this.pm.getPlugin(PluginInformation.class);

        Assert.assertNotNull("TestAnnotaions must be there!", ta);
        Assert.assertNotNull("Plugin Information must be there", pi);

View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

     */
    @Test
    public void testGetPluginClassOfP() {
        Assert.assertNotNull(this.pm);

        final TestAnnotations plugin = this.pm.getPlugin(TestAnnotations.class);

        Assert.assertNotNull(plugin);

        Assert.assertEquals(plugin.getInitStatus(), "INIT OK");
        Assert.assertEquals(plugin.getInjectionStatus(), "INJECTION OK");

        try {
            Thread.sleep(100);
        } catch (final InterruptedException e) {
            e.printStackTrace();
        }

        Assert.assertEquals(plugin.getThreadStatus(), "THREAD OK");
        Assert.assertEquals(plugin.getTimerStatus(), "TIMER OK");

    }
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

    /**
     *
     */
    @Test
    public void testAllInterfaces() {
        final TestAnnotations plugin = this.pm.getPlugin(TestAnnotations.class);

        System.out.println(plugin);

        Collection<Class<? extends Plugin>> allPluginClasses = getAllPluginClasses(plugin);
        for (Class<? extends Plugin> class1 : allPluginClasses) {
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

    //@Test
    public void testGetPluginClassOfPPluginSelectorOfP() {

        Assert.assertNotNull(this.pm);

        final TestAnnotations plugin = this.pm.getPlugin(TestAnnotations.class, new OptionPluginSelector<TestAnnotations>(new PluginSelector<TestAnnotations>() {

            public boolean selectPlugin(final TestAnnotations plugiN) {
                return false;
            }
View Full Code Here

Examples of net.xeoh.plugins.testplugins.testannotations.TestAnnotations

     */
    @Test
    public void testAnnotations() {
        Assert.assertNotNull(this.pm);

        final TestAnnotations plugin = this.pm.getPlugin(TestAnnotations.class);

        Assert.assertNotNull(plugin);

        Assert.assertEquals(plugin.getInitStatus(), "INIT OK");
        Assert.assertEquals(plugin.getInjectionStatus(), "INJECTION OK");

        try {
            Thread.sleep(100);
        } catch (final InterruptedException e) {
            e.printStackTrace();
        }

        Assert.assertEquals(plugin.getThreadStatus(), "THREAD OK");
        Assert.assertEquals(plugin.getTimerStatus(), "TIMER OK");

    }
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.