-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFetchingListing.java
More file actions
31 lines (24 loc) · 1001 Bytes
/
Copy pathFetchingListing.java
File metadata and controls
31 lines (24 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//------------------------------------------------------------------
// Copyright 2020 mobile.de GmbH.
// Author/Developer: Philipp Bartsch
//
// This code is licensed under MIT license (see LICENSE for details)
//------------------------------------------------------------------
package scenarios;
import static org.assertj.core.api.Assertions.assertThat;
import ecg.move.sellermodel.listing.Listing;
import java.util.Optional;
import java.util.UUID;
import org.example.moveclient.ListingLifecycleApiClient;
import org.example.moveclient.Main;
import org.junit.jupiter.api.Test;
class FetchingListing {
Main main = new Main();
@Test
void reading_nonexistent_listing_yields_404() {
String madeUpForeignId = UUID.randomUUID().toString();
ListingLifecycleApiClient listingLifecycleApiClient = main.getListingLifecycleApiClient();
Optional<Listing> listing = listingLifecycleApiClient.getListing(madeUpForeignId);
assertThat(listing).isEmpty();
}
}