This file contains hidden or 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
| ## Spring Boot testing guidelines | |
| When adding or changing tests in this Spring Boot application, prefer behavior-focused component tests over isolated unit tests. Tests should exercise the application the way production code is invoked, while keeping external dependencies controlled. | |
| ### Test from the system boundary | |
| - Tests for request-driven behavior must start from a controller endpoint. | |
| - Do not create isolated tests for services, entities, repositories, mappers, validators, or other classes that are reachable through an endpoint. | |
| - A service class should be covered through controller tests that trigger the service through the HTTP/API boundary. | |
| - Entity behavior, validation, persistence mappings, repository queries, and transactional behavior should be exercised as part of controller-driven tests whenever the behavior is reachable from an endpoint. |
This file contains hidden or 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
| BASE_NAME = paper | |
| INPUTS = $(wildcard *.tex) *.bib | |
| LATEX = latex | |
| PDFLATEX = pdflatex | |
| BIBTEX = bibtex | |
| MAKEINDEX = makeindex | |
| pdf: $(BASE_NAME).pdf | |
| ps: $(BASE_NAME).ps |
This file contains hidden or 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
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
This file contains hidden or 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
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
This file contains hidden or 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
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
This file contains hidden or 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 com.github.javaparser.StaticJavaParser; | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.expr.MethodCallExpr; | |
| import com.github.javaparser.ast.visitor.ModifierVisitor; | |
| import com.github.javaparser.ast.visitor.Visitable; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.PrintWriter; |
This file contains hidden or 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 com.github.javaparser.StaticJavaParser; | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.Node; | |
| import com.github.javaparser.ast.expr.MethodCallExpr; | |
| import com.github.javaparser.ast.visitor.ModifierVisitor; | |
| import com.github.javaparser.ast.visitor.Visitable; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.util.HashSet; |
This file contains hidden or 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 com.github.javaparser.StaticJavaParser; | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.expr.MethodCallExpr; | |
| import com.github.javaparser.ast.visitor.ModifierVisitor; | |
| import com.github.javaparser.ast.visitor.Visitable; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.util.HashSet; | |
| import java.util.Set; |
This file contains hidden or 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 static void main(String[] args) throws FileNotFoundException { | |
| CompilationUnit cu = StaticJavaParser.parse(new FileInputStream("/Users/mauricioaniche/workspace/logremoval/fixture/A.java")); | |
| cu.accept(new ModifierVisitor<Void>() { | |
| @Override | |
| public Visitable visit(final MethodCallExpr n, Void arg) { | |
| boolean isALogClass = n.getScope().isPresent() && (logClasses.stream().anyMatch(x -> n.getScope().get().toString().startsWith(x))); | |
| boolean isALogMethod = logMethods.contains(n.getName().asString()); |
This file contains hidden or 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
| def bf_queen(m): | |
| return bf_queen_rec(m, 0) | |
| def check(r, v): | |
| pos_1, pos_2 = v, v | |
| for j in r: | |
| pos_1 = pos_1 - 1 | |
| if m[j] == pos_1: | |
| return False |
NewerOlder