Skip to content

Instantly share code, notes, and snippets.

View sizovs's full-sized avatar
🌴
Mentoring software developers @ principal.dev

Eduards Sizovs sizovs

🌴
Mentoring software developers @ principal.dev
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util" xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
com.ofg.loans.backend.service.address.finder
interface AddressFinder
List<Address> find(Criteria)
class Address
String valueOf(AddressDetail addressDetail)
interface AddressDetail
enum UkAddressDetail implements AddressDetail
Configuration cfg,
Mapping mapping,
Settings settings,
EventListeners listeners,
SessionFactoryObserver observer) throws HibernateException {
log.info("building session factory");
this.statistics = new ConcurrentStatisticsImpl( this );
getStatistics().setStatisticsEnabled( settings.isStatisticsEnabled() );
log.debug( "Statistics initialized [enabled={}]}", settings.isStatisticsEnabled() );
public SessionFactoryImpl(
Configuration cfg,
Mapping mapping,
Settings settings,
EventListeners listeners,
SessionFactoryObserver observer) throws HibernateException {
log.info("building session factory");
this.statistics = new ConcurrentStatisticsImpl( this );
getStatistics().setStatisticsEnabled( settings.isStatisticsEnabled() );
Feature: Mailbox
Scenario: Registered users have a new message in the mailbox #1
Given I am "Johnny"
When I check my mailbox
Then I should have a "Welcome Johnny" message
Scenario: Registered users have a new message in the mailbox #2
Given I am "Eduards"
When I check my mailbox
package fm.ask.dao.user.auth;
import com.google.common.collect.ImmutableMap;
import com.rubylight.dao.ChunkQueryNotTotalMySQL;
import com.rubylight.dao.DAOAppException;
import com.rubylight.dao.DAOSysException;
import com.rubylight.dao.IChunkQueryDefinition;
import com.rubylight.dao.connection.IConnectionLookup;
import com.rubylight.entity.IChunkProperties;
import com.rubylight.entity.IListChunk;
void doStuff() {
if (newImplementation.isToggled()) {
doStuffInANewWay();
} else {
// DROP [new_do_stuff_toggled]
doStuffInAnOldWay();
}
}
// DROP [marketing_campaign_finished]
Map dropConditions = [
new_do_stuff_toggled : { cfg("new_do_stuff.enabled") == "true" },
marketing_campaign_finished : { timeCame "09/04/2014" }
]
def timeCame(String date) {
def today = new Date()
def expirationDate = new Date().parse('dd/MM/yyyy', date)
today.after expirationDate
}
def cfg(key) {
def uri = "http://production.configuration/$key".toURL()
uri.getText(connectTimeout: 2000, readTimeout: 3000)
}