View samplejob.yaml
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
- job-template: | |
name: '{name}-{pyver}' | |
builders: | |
- shell: 'git co {branch_name}' |
View sampletemplate.yaml
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
- project: | |
name: project-name | |
pyver: | |
- 26: | |
branch_name: old_branch | |
- 27: | |
branch_name: new_branch | |
jobs: | |
- '{name}-{pyver}' |
View ReactiveBlockTestExample.kt
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
@Test | |
fun `should return person data given name of the person`(){ | |
val monoPerson = PersonManager.getProfile("PersonX") | |
val expectedResult = Person(name = "PersonX", age = 18) | |
assertThat(monoPerson.block()).isEqual(expectedResult) | |
} | |
@Test | |
fun `should return list of person data`(){ | |
val fluxList = PersonManager.getAllProfile() |
View blockException.kt
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
@Test | |
fun `should throw exception while fetching person data`(){ | |
val personService = PersonService() | |
assertThatThrownBy{ | |
personService.getPerson("name") | |
}.isInstanceOf(PersonNotFound::class.java) | |
.hasMessage("No person found in the database") | |
} |
View stepVerifierException.kt
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
@Test | |
fun `should throw Exception for mono`(){ | |
val monoError = Mono.error<Exception>(Exception()) | |
StepVerifier.create(mono) | |
.expectError(Exception::class.java) | |
.verify() | |
} | |
@Test | |
fun `should consume thrown exception from flux`() { |
View StepVerifier.kt
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
@Test | |
fun `should return person data given name of the person`(){ | |
val monoPerson = PersonManager.getProfile("PersonX") | |
val expectedResult = Person(name = "PersonX", age = 18) | |
StepVerifier.create(monoPerson) | |
.expectNext(expectedResult) | |
.verifyComplete() | |
} |
View Person.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
public class Person { | |
private final Integer identificationNumber; | |
private final String name; | |
private final String email; | |
private final String phoneNumber; | |
private final String mobileNumber; | |
private final Address homeAddress; | |
private final Address officeAddress; | |
public Person(final Integer identificationNumber, |
View Address.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
public class Address{ | |
private final String addressLine1; | |
private final String AddressLine2; | |
private final Integer postalCode; | |
Address(final String addressLine1, | |
final String addressLine2, | |
final Integer postalCode) { | |
this.addressLine1 = addressLine1; | |
this.AddressLine2 = addressLine2; |
View PersonTest.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
class PersonTest { | |
@Test | |
public void shouldReturnTrueForCorrectEmail() { | |
Person person = new Person(1, | |
"John", | |
"john@gmail.com", | |
"888888", | |
"888888", | |
null, | |
null); |
View PersonTest.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
class PersonTest { | |
@Test | |
public void shouldReturnTrueForCorrectEmail() { | |
Person person = TestUtil.aPerson( | |
"John", | |
"john@gmail.com", | |
"888888", | |
"888888" | |
); |
OlderNewer