Package org.candlepin.model

Examples of org.candlepin.model.Status


    private Status statusUndef;
    private Status statusDb;

    @Before
    public void init() {
        status = new Status(Boolean.TRUE, "1.0", "2",
            Boolean.TRUE, "2.0", Rules.RulesSourceEnum.DEFAULT);
        statusUndef = new Status(Boolean.TRUE, "1.0", "2",
            Boolean.TRUE, "2.0", Rules.RulesSourceEnum.UNDEFINED);
        statusDb = new Status(Boolean.TRUE, "1.0", "2",
            Boolean.TRUE, "2.0", Rules.RulesSourceEnum.DATABASE);
    }
View Full Code Here


        PrintStream ps = new PrintStream(new File(this.getClass()
            .getClassLoader().getResource("version.properties").toURI()));
        ps.println("version=${version}");
        ps.println("release=${release}");
        StatusResource sr = new StatusResource(rulesCurator, config);
        Status s = sr.status();
        ps.close();
        assertNotNull(s);
        assertEquals("${release}", s.getRelease());
        assertEquals("${version}", s.getVersion());
        assertTrue(s.getResult());
    }
View Full Code Here

    public void unknown() throws Exception {
        PrintStream ps = new PrintStream(new File(this.getClass()
            .getClassLoader().getResource("version.properties").toURI()));
        ps.println("foo");
        StatusResource sr = new StatusResource(rulesCurator, config);
        Status s = sr.status();
        ps.close();
        assertNotNull(s);
        assertEquals("Unknown", s.getRelease());
        assertEquals("Unknown", s.getVersion());
        assertTrue(s.getResult());
    }
View Full Code Here

            .getClassLoader().getResource("version.properties").toURI()));
        ps.println("version=${version}");
        ps.println("release=${release}");
        when(rulesCurator.listAll()).thenThrow(new RuntimeException());
        StatusResource sr = new StatusResource(rulesCurator, config);
        Status s = sr.status();
        ps.close();
        assertNotNull(s);
        assertEquals("${release}", s.getRelease());
        assertEquals("${version}", s.getVersion());
        assertFalse(s.getResult());
    }
View Full Code Here

        PrintStream ps = new PrintStream(new File(this.getClass()
            .getClassLoader().getResource("version.properties").toURI()));
        ps.println("version=${version}");
        ps.println("release=${release}");
        StatusResource sr = new StatusResource(rulesCurator, null);
        Status s = sr.status();
        ps.close();

        // make sure we did not log anything which indicates
        // an exception
        verify(mockapp, never()).doAppend(message.capture());
        assertEquals("${release}", s.getRelease());
        assertEquals("${version}", s.getVersion());
        assertTrue(s.getResult());
        assertFalse(s.getStandalone());
    }
View Full Code Here

            }
        }
        catch (Exception e) {
            good = false;
        }
        Status status = new Status(good, version, release, standalone,
            rulesCurator.getRules().getVersion(), rulesCurator.getRules().getRulesSource());
        return status;
    }
View Full Code Here

TOP

Related Classes of org.candlepin.model.Status

Copyright © 2018 www.massapicom. 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.