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
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(); |
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 DataStore { | |
private ConnectionProvider connectionProvider; | |
public DataStore(ConnectionProvider connectionProvider) { | |
this.connectionProvider = connectionProvider; | |
} |
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
//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) { |
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 RestfulWebServiceTest { | |
@Rule | |
public JUnitRuleMockery context = new JUnitRuleMockery(); | |
@Mock | |
Request request; | |
@Mock | |
VacationRepository vacationRepository; |
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 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; |