I too have found that name a bit confusing. It actually kind of makes me think it is somehow a subclass of InitialContext.
Either one of your proposed names is fine with me. I guess I prefer LoggerContextRule simply because it is slightly shorter and we don’t support any other “Rule” types that I am aware of. Ralph > On Aug 29, 2015, at 12:07 PM, Gary Gregory <[email protected]> wrote: > > Hi All, > > I was going to write a couple of blog posts this weekend about log4j and I > was going to start by talking about how useful our InitialLoggerContext test > class is to isolate logging configs for specific tests, but I find the class > name misleading. The class is a JUnit Rule so it should be postfixed with > "Rule" IMO and the "Initial" prefix is just weird, initial as opposed to > what? We have no other LoggerContext JUnit rules. I would not mind renaming > this class to LoggerContextRule. That name is clear and there can be no > mistake that this is not a special kind of LoggerContext. I could even go for > LoggerContextJUnitRule to make it clear that it is for use with JUnit and not > in any other kind of code. > > Thoughts? > > Gary > > -- > E-Mail: [email protected] <mailto:[email protected]> | > [email protected] <mailto:[email protected]> > Java Persistence with Hibernate, Second Edition > <http://www.manning.com/bauer3/> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> > Spring Batch in Action <http://www.manning.com/templier/> > Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> > Home: http://garygregory.com/ <http://garygregory.com/> > Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
