#Context We have a project set-up of:
project-A
a-services-api
a-services-impl
project-B
b-services-api
b-services-impl
non-gradle-project-C
import java.util.Objects; | |
public class ValidationError { | |
private final String error; | |
private ValidationError(final String error) { | |
this.error = error; | |
} | |
public static ValidationError from(final String error) { |
// https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
val primes: Sequence<Int> = sequence { | |
var numbers = generateSequence(2) { it + 1 } | |
while (true) { | |
val prime = numbers.first() | |
yield(prime) | |
numbers = numbers | |
.drop(1) | |
.filter { it % prime != 0 } |
module Tests exposing (..) | |
import Test exposing (..) | |
import Expect | |
all : Test | |
all = | |
describe "sortBy tests" | |
[ dafuq ] |
@RunWith(MockitoJUnitRunner.class) | |
public class SettlementMockitoTest { | |
@Test | |
public void settlement_WhenMoreSettlersAssignedToDefenseThanAmountOfRaiders_CanDefendItself() throws Exception { | |
Raiders raiders = mock(Raiders.class); | |
when(raiders.getAmountOfRaiders()).thenReturn(1); | |
Settler defender = mock(Settler.class); | |
Settler farmer = mock(Settler.class); |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
package be.schelp.example; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.joda.time.DateMidnight; | |
import static org.assertj.core.api.Assertions.assertThat; | |
import be.schelp.test.FreezeDateRule; | |
public class FileFormatterTest { |
### Keybase proof | |
I hereby claim: | |
* I am sch3lp on github. | |
* I am sch3lp (https://keybase.io/sch3lp) on keybase. | |
* I have a public key whose fingerprint is 6A5E A0B7 A502 BCC7 B04D 768C FB9E E221 BB80 CEF6 | |
To claim this, I am signing this object: |
public class CustomerRepository extends AbstractDAO<Customer> { | |
public CustomerRepository(SessionFactory sessionFactory) { | |
super(sessionFactory); | |
} | |
public List<Customer> getAll() { | |
return list(namedQuery(Customer.QUERY_ALL)); | |
} |
package org.yourcompany.test; | |
import java.io.File; | |
import java.io.IOException; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.SortedSet; | |
import javax.sql.DataSource; |