Package com.ohba.autumn

Source Code of com.ohba.autumn.AutumnConfigTest

package com.ohba.autumn;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;

import org.junit.Test;

import co.ohba.autumn.AutumnConfig;

public class AutumnConfigTest {

  @Test
  public void shouldAllowNoQuotes() {
    String configJson = "{pojoMapping:false}";
    AutumnConfig result = AutumnConfig.fromJsonString(null,configJson);
    assertNotNull(result);
    assertFalse(result.getPojoMapping());
  }

  @Test
  public void shouldAllowSingleQuotes() {
    String configJson = "{'pojoMapping':false}";
    AutumnConfig result = AutumnConfig.fromJsonString(null, configJson);
    assertNotNull(result);
    assertFalse(result.getPojoMapping());
  }

  @Test
  public void shouldAllowComments() {
    String configJson = "{'pojoMapping' /* comment*/ :false} // other comment";
    AutumnConfig result = AutumnConfig.fromJsonString(null, configJson);
    assertNotNull(result);
    assertFalse(result.getPojoMapping());
  }
 
}
TOP

Related Classes of com.ohba.autumn.AutumnConfigTest

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.