Add factory for ChangeResource
This will allow us to inject classes that we need for the ETag computation. Change-Id: I0411d53c085eb271b2704fc83f6236bf2a26cc5f Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
		| @@ -197,6 +197,9 @@ public abstract class AbstractDaemonTest { | ||||
|   @Inject | ||||
|   protected ChangeNoteUtil changeNoteUtil; | ||||
|  | ||||
|   @Inject | ||||
|   protected ChangeResource.Factory changeResourceFactory; | ||||
|  | ||||
|   protected TestRepository<InMemoryRepository> testRepo; | ||||
|   protected GerritServer server; | ||||
|   protected TestAccount admin; | ||||
| @@ -741,6 +744,6 @@ public abstract class AbstractDaemonTest { | ||||
|     List<ChangeControl> ctls = changeFinder.find( | ||||
|         changeId, atrScope.get().getUser()); | ||||
|     assertThat(ctls).hasSize(1); | ||||
|     return new ChangeResource(ctls.get(0)); | ||||
|     return changeResourceFactory.create(ctls.get(0)); | ||||
|   } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Edwin Kempin
					Edwin Kempin