Example usage for junit.framework Assert assertFalse

List of usage examples for junit.framework Assert assertFalse

Introduction

In this page you can find the example usage for junit.framework Assert assertFalse.

Prototype

static public void assertFalse(boolean condition) 

Source Link

Document

Asserts that a condition is false.

Usage

From source file:ejportal.webapp.action.PaketActionTest.java

/**
 * Test edit./*from w  w w .ja  va  2 s  .  c o  m*/
 * 
 * @throws Exception
 *             the exception
 */
public void testEdit() throws Exception {
    this.log.debug("testing edit...");
    this.action.setPaketId(1L);
    Assert.assertNull(this.action.getPaket());
    Assert.assertEquals("edit", this.action.edit());
    Assert.assertNotNull(this.action.getPaket());
    Assert.assertFalse(this.action.hasActionErrors());
}

From source file:org.openscore.lang.compiler.modeller.transformers.DoTransformerTest.java

@Test
public void testTransformExpression() throws Exception {
    @SuppressWarnings("unchecked")
    List<Input> inputs = doTransformer.transform(doInputsMap);
    Assert.assertFalse(inputs.isEmpty());
    Assert.assertEquals(2, inputs.size());
    Input input = inputs.iterator().next();
    Assert.assertEquals("city", input.getName());
    Assert.assertEquals("city_name", input.getExpression());
}

From source file:io.cloudslang.lang.compiler.modeller.transformers.OutputsTransformerTest.java

@Test(timeout = DEFAULT_TIMEOUT)
public void testTransform() throws Exception {
    @SuppressWarnings("unchecked")
    List<Output> outputs = outputTransformer.transform(outputsMap);
    Assert.assertFalse(outputs.isEmpty());
}

From source file:de.hybris.platform.acceleratorservices.order.strategies.impl.CustomerServiceUncollectedConsignmentStrategyTest.java

@Test
public void testProcessConsignmentNOK() {
    BDDMockito.given(consignmentModel.getShippingDate())
            .willReturn(DateUtils.addHours(referenceDate, 0 - timeThreshold.intValue() + 1));

    final boolean result = customerServiceUncollectedConsignmentStrategy.processConsignment(consignmentModel);

    Assert.assertFalse(result);
}

From source file:de.hybris.platform.acceleratorservices.order.strategies.impl.ReminderUncollectedConsignmentStrategyTest.java

@Test
public void testProcessConsignmentNOK() {
    BDDMockito.given(consignmentModel.getShippingDate())
            .willReturn(DateUtils.addHours(referenceDate, 0 - timeThreshold.intValue() + 1));

    final boolean result = reminderUncollectedConsignmentStrategy.processConsignment(consignmentModel);

    Assert.assertFalse(result);
}

From source file:ejportal.webapp.action.UserActionTest.java

/**
 * Test edit.//from   www  . j  a  va 2 s.  c o m
 * 
 * @throws Exception
 *             the exception
 */
public void testEdit() throws Exception {
    // so request.getRequestURL() doesn't fail
    final MockHttpServletRequest request = new MockHttpServletRequest("GET", "/editUser.html");
    ServletActionContext.setRequest(request);

    this.action.setId("-1"); // regular user
    Assert.assertNull(this.action.getUser());
    Assert.assertEquals("success", this.action.edit());
    Assert.assertNotNull(this.action.getUser());
    Assert.assertFalse(this.action.hasActionErrors());
}

From source file:ejportal.webapp.action.NutzungActionTest.java

/**
 * Test edit.//www  . j av a2  s.c o m
 * 
 * @throws Exception
 *             the exception
 */
public void testEdit() throws Exception {
    this.log.debug("testing edit...");
    this.action.setNutzungId(1L);
    Assert.assertEquals("edit", this.action.edit());
    Assert.assertFalse(this.action.hasActionErrors());
}

From source file:ejportal.webapp.action.JournalActionTest.java

/**
 * Test edit./* www  .j a  va 2 s. c o m*/
 * 
 * @throws Exception
 *             the exception
 */
public void testEdit() throws Exception {
    this.log.debug("testing edit...");
    this.action.setJournalId(1L);
    Assert.assertNull(this.action.getJournal());
    Assert.assertEquals("edit", this.action.edit());
    Assert.assertNotNull(this.action.getJournalBaseTO());
    Assert.assertFalse(this.action.hasActionErrors());
}

From source file:ejportal.webapp.action.KonsortiumActionTest.java

/**
 * Test edit.//from www . j av  a 2s  .c  om
 * 
 * @throws Exception
 *             the exception
 */
public void testEdit() throws Exception {
    this.log.debug("testing edit...");
    this.action.setKonsortiumId(1L);
    Assert.assertNull(this.action.getKonsortium());
    Assert.assertEquals("edit", this.action.edit());
    Assert.assertNotNull(this.action.getKonsortium());
    Assert.assertFalse(this.action.hasActionErrors());
}

From source file:com.ewcms.publication.freemarker.directive.ChannelListDirectiveTest.java

@Test
public void testLoadingChannel() throws Exception {
    Channel channel = createChannel(1, true);
    ChannelPublishServiceable service = mock(ChannelPublishServiceable.class);
    when(service.getChannel(any(Integer.class), any(Integer.class))).thenReturn(channel);
    ChannelListDirective directive = new ChannelListDirective(service);

    List<Channel> list = directive.loadingChannel(1, 1, false, false, false);
    Assert.assertFalse(list.isEmpty());
    Assert.assertEquals(1, list.size());
}