Commit 696acab6 by Francisco Giordano

rename Impl contracts to Mock

parent 9efc0a88
......@@ -2,7 +2,7 @@ pragma solidity ^0.6.0;
import "../utils/Address.sol";
contract AddressImpl {
contract AddressMock {
function isContract(address account) external view returns (bool) {
return Address.isContract(account);
}
......
......@@ -2,7 +2,7 @@ pragma solidity ^0.6.0;
import "../utils/Arrays.sol";
contract ArraysImpl {
contract ArraysMock {
using Arrays for uint256[];
uint256[] private _array;
......
......@@ -2,7 +2,7 @@ pragma solidity ^0.6.0;
import "../utils/Counters.sol";
contract CountersImpl {
contract CountersMock {
using Counters for Counters.Counter;
Counters.Counter private _counter;
......
......@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/Create2.sol";
import "../introspection/ERC1820Implementer.sol";
contract Create2Impl {
contract Create2Mock {
function deploy(uint256 value, bytes32 salt, bytes memory code) public {
Create2.deploy(value, salt, code);
}
......
......@@ -3,14 +3,14 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const { balance, ether, expectRevert, send } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const AddressImpl = contract.fromArtifact('AddressImpl');
const AddressMock = contract.fromArtifact('AddressMock');
const EtherReceiver = contract.fromArtifact('EtherReceiverMock');
describe('Address', function () {
const [ recipient, other ] = accounts;
beforeEach(async function () {
this.mock = await AddressImpl.new();
this.mock = await AddressMock.new();
});
describe('isContract', function () {
......@@ -19,7 +19,7 @@ describe('Address', function () {
});
it('should return true for contract address', async function () {
const contract = await AddressImpl.new();
const contract = await AddressMock.new();
expect(await this.mock.isContract(contract.address)).to.equal(true);
});
});
......
......@@ -3,14 +3,14 @@ require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const ArraysImpl = contract.fromArtifact('ArraysImpl');
const ArraysMock = contract.fromArtifact('ArraysMock');
describe('Arrays', function () {
context('Even number of elements', function () {
const EVEN_ELEMENTS_ARRAY = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
beforeEach(async function () {
this.arrays = await ArraysImpl.new(EVEN_ELEMENTS_ARRAY);
this.arrays = await ArraysMock.new(EVEN_ELEMENTS_ARRAY);
});
it('should return correct index for the basic case', async function () {
......@@ -38,7 +38,7 @@ describe('Arrays', function () {
const ODD_ELEMENTS_ARRAY = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21];
beforeEach(async function () {
this.arrays = await ArraysImpl.new(ODD_ELEMENTS_ARRAY);
this.arrays = await ArraysMock.new(ODD_ELEMENTS_ARRAY);
});
it('should return correct index for the basic case', async function () {
......@@ -66,7 +66,7 @@ describe('Arrays', function () {
const WITH_GAP_ARRAY = [11, 12, 13, 14, 15, 20, 21, 22, 23, 24];
beforeEach(async function () {
this.arrays = await ArraysImpl.new(WITH_GAP_ARRAY);
this.arrays = await ArraysMock.new(WITH_GAP_ARRAY);
});
it('should return index of first element in next filled range', async function () {
......@@ -76,7 +76,7 @@ describe('Arrays', function () {
context('Empty array', function () {
beforeEach(async function () {
this.arrays = await ArraysImpl.new([]);
this.arrays = await ArraysMock.new([]);
});
it('should always return 0 for empty array', async function () {
......
......@@ -3,11 +3,11 @@ const { expectRevert } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const CountersImpl = contract.fromArtifact('CountersImpl');
const CountersMock = contract.fromArtifact('CountersMock');
describe('Counters', function () {
beforeEach(async function () {
this.counter = await CountersImpl.new();
this.counter = await CountersMock.new();
});
it('starts at zero', async function () {
......
......@@ -3,7 +3,7 @@ const { balance, BN, ether, expectRevert, send } = require('@openzeppelin/test-h
const { expect } = require('chai');
const Create2Impl = contract.fromArtifact('Create2Impl');
const Create2Mock = contract.fromArtifact('Create2Mock');
const ERC20Mock = contract.fromArtifact('ERC20Mock');
const ERC1820Implementer = contract.fromArtifact('ERC1820Implementer');
......@@ -21,7 +21,7 @@ describe('Create2', function () {
const constructorByteCode = `${ERC20Mock.bytecode}${encodedParams}`;
beforeEach(async function () {
this.factory = await Create2Impl.new();
this.factory = await Create2Mock.new();
});
it('should compute the correct contract address', async function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment