Search in sources :

Example 1 with RulesCurator

use of org.candlepin.model.RulesCurator in project candlepin by candlepin.

the class RulesExporterTest method testMetaExporter.

@Test
public void testMetaExporter() throws IOException {
    RulesCurator rulesCurator = mock(RulesCurator.class);
    when(rulesCurator.getRules()).thenReturn(new Rules(FAKE_RULES));
    RulesExporter exporter = new RulesExporter(rulesCurator);
    StringWriter writer = new StringWriter();
    exporter.export(writer);
    assertEquals(FAKE_RULES, writer.toString());
}
Also used : RulesCurator(org.candlepin.model.RulesCurator) StringWriter(java.io.StringWriter) Rules(org.candlepin.model.Rules) Test(org.junit.Test)

Aggregations

StringWriter (java.io.StringWriter)1 Rules (org.candlepin.model.Rules)1 RulesCurator (org.candlepin.model.RulesCurator)1 Test (org.junit.Test)1