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
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |
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
// ==UserScript== | |
// @id iitc-plugin-portal-export | |
// @name IITC plugin: Export visible portals to JSON | |
// @category Info | |
// @version 0.1.0.@@DATETIMEVERSION@@ | |
// @namespace https://github.com/jonatkins/ingress-intel-total-conversion | |
// @updateURL @@UPDATEURL@@ | |
// @downloadURL @@DOWNLOADURL@@ | |
// @description [@@BUILDNAME@@-@@BUILDDATE@@] Display a list of all localized portals by level and faction. | |
// @include https://www.ingress.com/intel* |
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
// 1. arrange or setup step | |
Baby baby = new Baby(); | |
// 2. act or action step | |
baby.removeToy(); | |
// 3. assertion or verification step | |
assertTrue(baby.isCrying()); |
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
Baby baby = new Baby(); | |
baby.removeToy(); | |
assertTrue(baby.isCrying()); |
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
Baby baby = new Baby(); | |
boolean toyGiven = baby.giveToy(null); | |
assertFalse(toyGiven); |
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
Baby baby = new Baby(); | |
Bottle bottle = new MockBottle(); | |
// a csecsemőnek szüksége van egy üvegre a táplálkozáshoz | |
baby.feed(bottle); | |
assertTrue(bottle.isConsumeCalled()); | |
class MockBottle extends Bottle { | |
@Override void consume() { | |
mConsumeCalled = true; | |
} |
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
Baby baby = new Baby(); | |
boolean exceptionWasThrown = false; | |
try { | |
baby.removeToy(); | |
} catch (ToyNotExistsException e) { | |
exceptionWasThrown = true; | |
} | |
assertTrue(exceptionWasThrown); |
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
// injection via constructor | |
Baby baby = new Baby(new MockBottle()); | |
// injection via setter | |
Baby baby = new Baby(); | |
baby.giveBottle(new MockBottle()); |
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
class Baby { | |
private Bottle mBottle; | |
public Baby() { | |
// rossz, nem tesztelhető kód | |
mBottle = new Bottle(); | |
} | |
} |
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
ArticleViewActivity a = new ArticleViewActivity(); | |
Bundle b = new Bundle(); | |
b.putString("articleId", "bab13"); | |
a.onCreate(b); | |
assertTrue(a.hasArticle()); |
OlderNewer