![]() Ethanol sensitivity and rapid ethanol tolerance, respectively, were altered in flies with mutations in amnesiac and hangover, genes known to influence these traits. Ethanol sensitivity and rapid ethanol tolerance varied across 4 control strains, but internal ethanol concentrations were indistinguishable in the 4 strains during a first and second challenge with ethanol. Flies developed tolerance to the intoxicating effects of ethanol when tested during a second exposure. Negative geotaxis measured in eRING assays was dose-dependently impaired by ethanol exposure. We also used eRING in a candidate screen to identify mutants with altered ethanol-related behaviors. We validated the assay by assessing acute sensitivity to ethanol and rapid ethanol tolerance in several different control strains and in flies with mutations known to disrupt these behaviors. We established eRING (ethanol Rapid Iterative Negative Geotaxis) as an assay for quantitating the sedative effects of ethanol on negative geotaxis (i.e., startle-induced climbing). To enhance the utility of the Drosophila model for investigating genes involved in ethanol-related behavior, we explored the value of an assay that measures the sedative effects of ethanol on negative geotaxis, an evoked locomotor response. By coupling assays for ethanol-related behavior to the genetic tools available in flies, a number of genes have been identified that influence physiological responses to ethanol. When I faced this problem for the first time I asked myself what the best way to inject the components I needed in my tests was.Ethanol induces similar behavioral responses in mammals and the fruit fly, Drosophila melanogaster. While this is an acceptable solution, it doesn’t take full advantage of the Guice capabilities. As a trivial solution you could make every test class to extend a common class with a static method that is annotated with this method has to be used once per test to setup the Guice injector. ![]() If you’re unit testing components with JUnit you surely face where to put the initialization code that reads the Guice configuration modules and creates the injector(s). All you have to do is define which interfaces are implemented by which concrete classes and which objects are to be injected in your components. Thanks to the dependcy injection design pattern, Guice helps you decouple components and configure dependencies. Guice is an easy way to blend these two patterns together into a single framework and much more. ![]() Of course, if you follow these two patterns in Java you’ll have to abandon the new operator. On the other hand, using a builder you centralize the construction of complex objects so that the way these objects are built (and their dependencies in particular) is defined once for all in the code. ![]() For instance, if you delegate the construction of instances of an interface to a factory method, which concrete class will be used to create the instances will depend on the particular implementation of the factory method which, in turn, will vary from application to application. The intent of these two patterns is to separate the construction of objects from their representation and from their usage. Until I came across Guice (and Spring, to be honest), I was used to honor two main design patterns: factory methods and builder. ![]() Guice is an open source tool by Google that aims at simplifying the construction of software components especially when complex relationships exist between its parts. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |