Skip to content

Commit

Permalink
Wire up a mock amalgamted service
Browse files Browse the repository at this point in the history
  • Loading branch information
aherbst-broad committed Apr 19, 2024
1 parent c65d95a commit 7887d26
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ public class LandingZoneApiDispatchTest extends BaseAzureSpringBootUnitTest {
new SpendProfileId(UUID.randomUUID().toString());

private LandingZoneApiDispatch landingZoneApiDispatch;
@Mock private LandingZoneService landingZoneService;
@Mock private FeatureConfiguration featureConfiguration;
@Mock private WorkspaceService workspaceService;
@Mock private LandingZoneService landingZoneService;
@Mock private LandingZoneServiceFactory landingZoneServiceFactory;

@BeforeEach
void setupLandingZoneTests() {
when(featureConfiguration.isAzureEnabled()).thenReturn(true);
var amalgamted = new AmalgamatedLandingZoneService(landingZoneService);
when(landingZoneServiceFactory.getLandingZoneService()).thenReturn(amalgamted);

landingZoneApiDispatch =
new LandingZoneApiDispatch(
featureConfiguration, mockSamService(), landingZoneServiceFactory);
Expand Down

0 comments on commit 7887d26

Please sign in to comment.