Skip to content

Instantly share code, notes, and snippets.

View panayotkulchev's full-sized avatar

Panayot Kulchev panayotkulchev

  • Triya Fintech Bulgaria
  • Bulgaria, Veliko Tarnovo
View GitHub Profile
describe("Contract payment controller should", function () {
var ctrl, scope, gateway, deffer, growl, pageForwarding, stateParams;
beforeEach(function () {
module('bss.contract.payments');
inject(function ($controller, $q, $rootScope) {
scope = $rootScope.$new();
deffer = $q.defer();
public class DataStore {
private ConnectionProvider connectionProvider;
public DataStore(ConnectionProvider connectionProvider) {
this.connectionProvider = connectionProvider;
}
//ping?task=transformUsersAddress
if ("transformUsersAddress".equals(task)) {
List<String> usersWithAddress = Lists.newArrayList();
List<UserEntity> users = Lists.newArrayList(datastore.get().find().type(UserEntity.class).now());
for (UserEntity each : users) {
UserAddressEntity address = each.getAddress();
if (address != null) {
@panayotkulchev
panayotkulchev / TestFromPKulchev
Created June 17, 2015 14:16
First test of clouway-hr
public class RestfulWebServiceTest {
@Rule
public JUnitRuleMockery context = new JUnitRuleMockery();
@Mock
Request request;
@Mock
VacationRepository vacationRepository;
import adapter.db.ConnectionProvider;
import adapter.db.JdbcConnectionProvider;
import adapter.db.PersistentFundsRepository;
import adapter.db.PersistentSessionRepository;
import adapter.db.PersistentUserRepository;
import adapter.http.ConnectionFilter;
import adapter.http.LoginFilter;
import adapter.http.SecurityFilter;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;