Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OTSWithFeign
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Siva Naga Someswara Jatla
OTSWithFeign
Commits
49e994ef
Commit
49e994ef
authored
Apr 20, 2020
by
Kali Padhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge with latest cahnges and changed PK to string
parent
78aa6eb8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+14
-14
readme.md
readme.md
+4
-4
OfferControllerTest.java
...fertransactionservice/controller/OfferControllerTest.java
+3
-3
OfferTransactionControllerIntegrationTest.java
...controller/OfferTransactionControllerIntegrationTest.java
+3
-3
OfferTransactionControllerTest.java
...ionservice/controller/OfferTransactionControllerTest.java
+1
-1
application-integration.properties
src/test/resources/application-integration.properties
+3
-3
No files found.
readme.md
View file @
49e994ef
...
@@ -61,16 +61,16 @@ Once you create use the below query to insert a data
...
@@ -61,16 +61,16 @@ Once you create use the below query to insert a data
INSERT INTO public.offer_lookup
(
INSERT INTO public.offer_lookup
(
store_id, terminal, offer_type, offer_id, pre_condition,
id
)
store_id, terminal, offer_type, offer_id, pre_condition,
id
)
VALUES
(
'0001'
,
'001'
,
'Customer'
,1,
'AND'
,
"54321"
)
;
VALUES
(
'0001'
,
'001'
,
'Customer'
,1,
'AND'
,
'54321'
)
;
INSERT INTO public.offer_lookup
(
INSERT INTO public.offer_lookup
(
store_id, terminal, offer_type, offer_id, pre_condition,id
)
store_id, terminal, offer_type, offer_id, pre_condition,id
)
VALUES
(
'0001'
,
'001'
,
'Customer'
,2,
'AND'
,
"54321"
)
;
VALUES
(
'0001'
,
'001'
,
'Customer'
,2,
'AND'
,
'54321'
)
;
INSERT INTO public.offer_lookup
(
INSERT INTO public.offer_lookup
(
store_id, terminal, offer_type, offer_id, pre_condition,id
)
store_id, terminal, offer_type, offer_id, pre_condition,id
)
VALUES
(
'0001'
,
'001'
,
'Customer'
,3,
'AND'
,
"54321"
)
;
VALUES
(
'0001'
,
'001'
,
'Customer'
,3,
'AND'
,
'54321'
)
;
INSERT INTO public.offer_lookup
(
INSERT INTO public.offer_lookup
(
store_id, terminal, offer_type, offer_id, pre_condition,id
)
store_id, terminal, offer_type, offer_id, pre_condition,id
)
VALUES
(
'0001'
,
'001'
,
'Customer'
,4,
'AND'
,
"54321"
)
;
VALUES
(
'0001'
,
'001'
,
'Customer'
,4,
'AND'
,
'54321'
)
;
```
```
...
...
src/test/java/com/nisum/offertransactionservice/controller/OfferControllerTest.java
View file @
49e994ef
...
@@ -71,8 +71,8 @@ public class OfferControllerTest {
...
@@ -71,8 +71,8 @@ public class OfferControllerTest {
}
}
public
List
<
OfferLookup
>
returnOffers
()
{
public
List
<
OfferLookup
>
returnOffers
()
{
OfferLookup
offerLookup1
=
new
OfferLookup
(
1L
,
"12"
,
23L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup1
=
new
OfferLookup
(
"1"
,
"12"
,
23L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
2L
,
"13"
,
24L
,
"02"
,
"OR"
,
"BXGY"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
"2"
,
"13"
,
24L
,
"02"
,
"OR"
,
"BXGY"
);
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup2
);
offerLookups
.
add
(
offerLookup2
);
...
@@ -93,7 +93,7 @@ public class OfferControllerTest {
...
@@ -93,7 +93,7 @@ public class OfferControllerTest {
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
offerTransactionRequest
.
setHhId
(
123L
);
offerTransactionRequest
.
setHhId
(
"123"
);
List
<
Item
>
itemList
=
new
ArrayList
<>();
List
<
Item
>
itemList
=
new
ArrayList
<>();
Item
item1
=
new
Item
(
"Coke"
,
"12"
,
13.05
);
Item
item1
=
new
Item
(
"Coke"
,
"12"
,
13.05
);
Item
item2
=
new
Item
(
"Thumpsup"
,
"11"
,
14.05
);
Item
item2
=
new
Item
(
"Thumpsup"
,
"11"
,
14.05
);
...
...
src/test/java/com/nisum/offertransactionservice/controller/OfferTransactionControllerIntegrationTest.java
View file @
49e994ef
...
@@ -135,8 +135,8 @@ public class OfferTransactionControllerIntegrationTest extends AbstractTestBase{
...
@@ -135,8 +135,8 @@ public class OfferTransactionControllerIntegrationTest extends AbstractTestBase{
public
List
<
OfferLookup
>
returnOffers
()
{
public
List
<
OfferLookup
>
returnOffers
()
{
OfferLookup
offerLookup1
=
new
OfferLookup
(
1L
,
"12"
,
23L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup1
=
new
OfferLookup
(
"1"
,
"12"
,
23L
,
"02"
,
"AND"
,
"BOGO"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
2L
,
"13"
,
24L
,
"02"
,
"OR"
,
"BXGY"
);
OfferLookup
offerLookup2
=
new
OfferLookup
(
"2"
,
"13"
,
24L
,
"02"
,
"OR"
,
"BXGY"
);
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
List
<
OfferLookup
>
offerLookups
=
new
ArrayList
<>();
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup1
);
offerLookups
.
add
(
offerLookup2
);
offerLookups
.
add
(
offerLookup2
);
...
@@ -145,7 +145,7 @@ public class OfferTransactionControllerIntegrationTest extends AbstractTestBase{
...
@@ -145,7 +145,7 @@ public class OfferTransactionControllerIntegrationTest extends AbstractTestBase{
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
offerTransactionRequest
.
setHhId
(
54321L
);
offerTransactionRequest
.
setHhId
(
"54321"
);
offerTransactionRequest
.
setItemList
(
getItemList
());
offerTransactionRequest
.
setItemList
(
getItemList
());
return
offerTransactionRequest
;
return
offerTransactionRequest
;
}
}
...
...
src/test/java/com/nisum/offertransactionservice/controller/OfferTransactionControllerTest.java
View file @
49e994ef
...
@@ -93,7 +93,7 @@ class OfferTransactionControllerTest {
...
@@ -93,7 +93,7 @@ class OfferTransactionControllerTest {
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
private
OfferTransactionRequest
getOfferTransactionRequest
()
{
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
OfferTransactionRequest
offerTransactionRequest
=
new
OfferTransactionRequest
();
offerTransactionRequest
.
setHhId
(
54321L
);
offerTransactionRequest
.
setHhId
(
"54321"
);
offerTransactionRequest
.
setItemList
(
getItemList
());
offerTransactionRequest
.
setItemList
(
getItemList
());
return
offerTransactionRequest
;
return
offerTransactionRequest
;
}
}
...
...
src/test/resources/application-integration.properties
View file @
49e994ef
spring.datasource.url
=
jdbc:postgresql://127.0.0.1:5432/
postgres
spring.datasource.url
=
jdbc:postgresql://127.0.0.1:5432/
storedb
spring.datasource.username
=
user
spring.datasource.username
=
postgres
spring.datasource.password
=
password123
spring.datasource.password
=
dbpwd
endpoint.url.promotionEngineUrl
=
/promotionEngine/calculateDiscount
endpoint.url.promotionEngineUrl
=
/promotionEngine/calculateDiscount
endpoint.url.peBaseUrl
=
http://localhost:7073
endpoint.url.peBaseUrl
=
http://localhost:7073
endpoint.url.storeProducerUrl
=
/store/producer
endpoint.url.storeProducerUrl
=
/store/producer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment