Package com.github.sommeri.less4j.LessSource

Examples of com.github.sommeri.less4j.LessSource.FileSource


  private static final String file = "src/test/resources/less-source/level-1/level-2/source.less";

  @Test
  public void lastModifiedPropagation() throws FileNotFound, CannotReadFile {
    FileSource main = new FileSource(new File(file));
    FileSource firstImport = main.relativeSource("imported-1.less");
    FileSource secondImport = firstImport.relativeSource("../imported-2.less");
   
    long mainModified = setLastModified(main, 1364590362375L);
    long firstModified = setLastModified(firstImport, 1364590418644L);
    long secondModified = setLastModified(secondImport, 1364590474913L);
   
    main.getContent();
    assertModified(main, mainModified, mainModified);

    firstImport.getContent();
    assertModified(main, mainModified, firstModified);
    assertModified(firstImport, firstModified, firstModified);
   
    secondImport.getContent();
    assertModified(main, mainModified, secondModified);
    assertModified(firstImport, firstModified, secondModified);
    assertModified(secondImport, secondModified, secondModified);
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.LessSource.FileSource

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.