I hereby claim:
- I am d4nte on github.
- I am froyer (https://keybase.io/froyer) on keybase.
- I have a public key ASDShRwM1S6QFnIhN7I4aDtRMIa4drhsHW7TDyuNM3Fgiwo
To claim this, I am signing this object:
const GitHub = require('github-api'); | |
const gh = new GitHub({ | |
token: '' | |
}); | |
async function getIssues(issueHandler) { | |
await issueHandler.listIssues({ | |
state: "closed", |
const ethutil = require("ethereumjs-util"); | |
const Web3 = require("web3"); | |
const Api = require("@parity/api"); | |
const provider = new Api.Provider.Http('http://localhost:33056'); | |
const api = new Api(provider); | |
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:33056")); | |
async function printTx (txid) { |
I hereby claim:
To claim this, I am signing this object:
using ::testing::Return; | |
using ::testing::NiceMock; | |
struct MockMyNewFeature: public MyNewFeatureAbstract | |
{ | |
MOCK_CONST_METHOD0(getDataString, const std::string()); | |
}; | |
namespace | |
{ |
std::string MyNewFeatureAbstract::greet() | |
{ | |
std::string str = "Merry Christmas! "; | |
str.append(getDataString()); | |
return str; | |
} | |
const std::string MyNewFeature::getDataString() const | |
{ | |
return _data.getString(); |
class MyNewFeatureAbstract | |
{ | |
public: | |
std::string greet(); | |
protected: | |
virtual const std::string getDataString() const = 0; | |
}; | |
class MyNewFeature: public MyNewFeatureAbstract |
std::string MyNewFeature::greet(const StinkyOldLegacyDataClass& iData) | |
{ | |
std::string str = "Merry Christmas! "; | |
const int aInt = iData.getInt(); | |
if (aInt) | |
{ | |
str = "Creepy Halloween! "; | |
} | |
str.append(iData.getString()); | |
return str; |
std::string MyNewFeature::greet(const StinkyOldLegacyDataClass& iData) | |
{ | |
std::string str = "Merry Christmas! "; | |
str.append(iData.getString()); | |
return str; | |
} |
using ::testing::Return; | |
using ::testing::NiceMock; | |
namespace | |
{ | |
TEST(MyNewFeatureTest, PrependFestiveWord) | |
{ | |
NiceMock<MockStinkyOldLegacyDataClass> myMock; | |
std::string strDef = "ho ho ho"; |
class MockStinkyOldLegacyDataClass: public StinkyOldLegacyDataClass | |
{ | |
public: | |
MOCK_CONST_METHOD0(getString, const std::string()); | |
MOCK_CONST_METHOD0(getInt, const int()); | |
// And so on, 50 more of those please | |
// ... | |
}; |