File tree Expand file tree Collapse file tree
api-gateway/src/test/java/com/iluwatar/api/gateway Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .iluwatar .api .gateway ;
2+
3+ import org .junit .Test ;
4+
5+ import static org .junit .Assert .assertEquals ;
6+
7+ public class ApiGatewayTest {
8+
9+ /**
10+ * Tests getting the data for a desktop client
11+ */
12+ @ Test
13+ public void testGetProductDesktop () {
14+ ApiGateway apiGateway = new ApiGateway ();
15+ DesktopProduct desktopProduct = apiGateway .getProductDesktop ();
16+
17+ assertEquals ("20" , desktopProduct .getPrice ());
18+ assertEquals ("/product-image.png" , desktopProduct .getImagePath ());
19+ }
20+
21+ /**
22+ * Tests getting the data for a mobile client
23+ */
24+ @ Test
25+ public void testGetProductMobile () {
26+ ApiGateway apiGateway = new ApiGateway ();
27+ MobileProduct mobileProduct = apiGateway .getProductMobile ();
28+
29+ assertEquals ("20" , mobileProduct .getPrice ());
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ package com .iluwatar .api .gateway ;
2+
3+ import org .junit .Test ;
4+
5+ /**
6+ *
7+ * Application test
8+ *
9+ */
10+ public class AppTest {
11+
12+ @ Test
13+ public void test () throws Exception {
14+ String [] args = {};
15+ App .main (args );
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments