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
docker pull owasp/dependency-track | |
docker volume create --name dependency-track | |
docker run -d -p 8080:8080 –name dependency-track -v dependency-track:/data owasp/dependency-track |
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
Given a NC-17 rated showing | |
When a child tries to buy a ticket for this showing | |
Then the purchase is forbidden |
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
Feature: Profile endpoint | |
Scenario: creating a profile | |
Given path 'profiles' | |
And request | |
""" | |
{ "topics": [{"name": "DDD"},{"name": "Hexagonal Architecture"}],"talksFormats": ["QUICKIE","CONFERENCE"] } | |
""" | |
When method post | |
Then assert responseStatus == 201 |
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 StepDefs implements En { | |
public StepDefs() { | |
Given("^a cinephile$", () -> me = new Cinephile("me")); | |
Given("^the last showing is not started yet$", | |
() -> lastShowing = new Showing(now().plusHours(3))); | |
When("^the user asks for the next showings$", | |
() -> nextShowings = searchShowings.searchNextShowingsFor(me)); |
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
Given the showing: | |
| name | schedule | director | rating | duration | | |
| Gore Movie | 21H00 | Jhon Doe | NC-17 | PT2H5M | | |
When a child tries to buy a ticket for this showing | |
Then the purchase is forbidden |
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
jdbcTemplate | |
.queryForObject( | |
"Select * from users where username='" + name + "' and password='" + password + "'", | |
BeanPropertyRowMapper.newInstance(DBUser.class)); |
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
Select * from users where username='' OR '1'='1' LIMIT 1 --' and password='' |
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
@Configuration | |
public class DomainConfiguration { | |
@Bean | |
public RetrieveSanitaryGrades retrieveSanitaryGrades() { | |
return new RetrieveSanitaryGrades(); | |
} | |
@Bean | |
public SearchRestaurants restaurantsFinder(Restaurants restaurants, |
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
import java.lang.annotation.Inherited | |
@Retention(AnnotationRetention.RUNTIME) | |
@Target(AnnotationTarget.CLASS) | |
@Inherited | |
annotation class DomainService | |
@Retention(AnnotationRetention.RUNTIME) | |
@Target(AnnotationTarget.CLASS) | |
@Inherited |
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
/** | |
* <p> | |
* A DDD aggregate is a cluster of domain objects that is treated as a | |
* single unit to ensure consistency across them. | |
* </p> | |
* | |
* @see <a href= "https://martinfowler.com/bliki/DDD_Aggregate.html"> | |
* Aggregates in Domain Driven Design | |
* </a> | |
*/ |
OlderNewer