Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
57 changed files
with
785 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
rqueue-common-test/src/main/java/com/github/sonus21/rqueue/test/dto/ChatIndexing.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2020 Sonu Kumar | ||
* | ||
* 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
package com.github.sonus21.rqueue.test.dto; | ||
|
||
import java.util.UUID; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import org.apache.commons.lang3.RandomUtils; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString | ||
@EqualsAndHashCode(callSuper = true) | ||
public class ChatIndexing extends BaseQueueMessage { | ||
private int userId; | ||
private Long timestamp; | ||
|
||
public static ChatIndexing newInstance() { | ||
ChatIndexing chatIndexing = | ||
new ChatIndexing(RandomUtils.nextInt(100000, 1000000), System.currentTimeMillis()); | ||
chatIndexing.setId(UUID.randomUUID().toString()); | ||
return chatIndexing; | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
rqueue-common-test/src/main/java/com/github/sonus21/rqueue/test/dto/FeedGeneration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright 2020 Sonu Kumar | ||
* | ||
* 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
package com.github.sonus21.rqueue.test.dto; | ||
|
||
import java.util.UUID; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import org.apache.commons.lang3.RandomUtils; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@ToString | ||
@EqualsAndHashCode(callSuper = true) | ||
public class FeedGeneration extends BaseQueueMessage { | ||
private int userId; | ||
private Long timestamp; | ||
|
||
public static FeedGeneration newInstance() { | ||
FeedGeneration feedGeneration = | ||
new FeedGeneration(RandomUtils.nextInt(1000, 1000000), System.currentTimeMillis()); | ||
feedGeneration.setId(UUID.randomUUID().toString()); | ||
return feedGeneration; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
rqueue-common-test/src/main/java/com/github/sonus21/rqueue/test/dto/OrderConfirmation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright 2020 Sonu Kumar | ||
* | ||
* 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
package com.github.sonus21.rqueue.test.dto; | ||
|
||
import java.util.UUID; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString | ||
@EqualsAndHashCode(callSuper = true) | ||
public class OrderConfirmation extends BaseQueueMessage { | ||
private String orderId; | ||
private String userId; | ||
private long timestamp; | ||
|
||
public static OrderConfirmation newInstance() { | ||
OrderConfirmation orderConfirmation = | ||
new OrderConfirmation( | ||
UUID.randomUUID().toString(), UUID.randomUUID().toString(), System.currentTimeMillis()); | ||
orderConfirmation.setId(UUID.randomUUID().toString()); | ||
return orderConfirmation; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
rqueue-common-test/src/main/java/com/github/sonus21/rqueue/test/dto/Otp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright 2020 Sonu Kumar | ||
* | ||
* 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
package com.github.sonus21.rqueue.test.dto; | ||
|
||
import java.util.Random; | ||
import java.util.UUID; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import org.apache.commons.lang3.RandomStringUtils; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString | ||
@EqualsAndHashCode(callSuper = true) | ||
public class Otp extends BaseQueueMessage { | ||
private String phoneNumber; | ||
private String otp; | ||
|
||
public static Otp newInstance() { | ||
Otp otp = | ||
new Otp( | ||
"+91" + RandomStringUtils.randomNumeric(10), | ||
String.valueOf(new Random().nextInt(100000))); | ||
otp.setId(UUID.randomUUID().toString()); | ||
return otp; | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
rqueue-common-test/src/main/java/com/github/sonus21/rqueue/test/dto/Reservation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2020 Sonu Kumar | ||
* | ||
* 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 | ||
* | ||
* https://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. | ||
*/ | ||
|
||
package com.github.sonus21.rqueue.test.dto; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.UUID; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import org.apache.commons.lang3.RandomStringUtils; | ||
import org.apache.commons.lang3.RandomUtils; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString | ||
@EqualsAndHashCode(callSuper = true) | ||
public class Reservation extends BaseQueueMessage { | ||
private int requestId; | ||
private Map<String, String> otherDetails; | ||
|
||
public static Reservation newInstance() { | ||
Map<String, String> other = new HashMap<>(); | ||
int count = RandomUtils.nextInt(1, 10); | ||
for (int i = 0; i < count; i++) { | ||
String key = RandomStringUtils.randomAlphabetic(10); | ||
String value = RandomStringUtils.randomAlphabetic(10); | ||
other.put(key, value); | ||
} | ||
Reservation reservation = new Reservation(RandomUtils.nextInt(), other); | ||
reservation.setId(UUID.randomUUID().toString()); | ||
return reservation; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.