Revert creation of test utility class finally not needed
This commit is contained in:
parent
9c790a7374
commit
3d5c863276
|
@ -1,41 +0,0 @@
|
|||
package ca.uhn.fhir.jpa.dao.data;
|
||||
|
||||
/*
|
||||
* #%L
|
||||
* HAPI FHIR JPA Server
|
||||
* %%
|
||||
* Copyright (C) 2014 - 2021 Smile CDR, Inc.
|
||||
* %%
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import ca.uhn.fhir.jpa.entity.TermValueSet;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class includes a method which we wanted removed from DAO in production code,
|
||||
* but was heavily used in tests, where it is OK as they test limited use cases.
|
||||
*/
|
||||
public interface ITermValueSetDaoTestUtil extends JpaRepository<TermValueSet, Long> {
|
||||
|
||||
// todo: JM can this be just replaced by new class method?
|
||||
@Query(value="SELECT vs FROM TermValueSet vs INNER JOIN ResourceTable r ON r.myId = vs.myResourcePid WHERE vs.myUrl = :url ORDER BY r.myUpdated DESC")
|
||||
List<TermValueSet> findTermValueSetByUrl(Pageable thePage, @Param("url") String theUrl);
|
||||
|
||||
}
|
|
@ -408,7 +408,7 @@ public class ValueSetExpansionR4Test extends BaseTermR4Test {
|
|||
// Confirm we pre-expanded successfully
|
||||
runInTransaction(() -> {
|
||||
Pageable page = Pageable.unpaged();
|
||||
List<TermValueSet> valueSets = myTermValueSetDaoTestUtil.findTermValueSetByUrl(page, "http://foo/vs");
|
||||
List<TermValueSet> valueSets = myTermValueSetDao.findTermValueSetByUrl(page, "http://foo/vs");
|
||||
assertEquals(1, valueSets.size());
|
||||
assertEquals(TermValueSetPreExpansionStatusEnum.EXPANDED, valueSets.get(0).getExpansionStatus());
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue