AdocContentMetaMother.java (914B)
1 package com.wimdupont.personalweb.model.dao.projection; 2 3 import com.wimdupont.personalweb.model.AdocContentType; 4 5 import java.time.LocalDateTime; 6 7 public class AdocContentMetaMother { 8 9 public static class Defaults { 10 public static final AdocContentType ADOC_CONTENT_TYPE = AdocContentType.GUIDE; 11 public static final LocalDateTime COMMITTED_DATE = LocalDateTime.of(2000, 1, 1, 0, 0); 12 } 13 14 public static AdocContentMeta withDefaults(String path) { 15 return new AdocContentMeta() { 16 @Override 17 public String getPath() { 18 return path; 19 } 20 21 @Override 22 public AdocContentType getContentType() { 23 return Defaults.ADOC_CONTENT_TYPE; 24 } 25 26 @Override 27 public LocalDateTime getCommittedDate() { 28 return Defaults.COMMITTED_DATE; 29 } 30 }; 31 } 32 33 }