-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using Given, When, Then keywords on the branching trees
- Loading branch information
1 parent
fcbc567
commit d365705
Showing
10 changed files
with
51 additions
and
51 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
test/integration/concrete/comptroller/protocol-fees/protocolFees.tree
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
protocolFees.t.sol | ||
├── when the protocol fee has not been set | ||
│ └── it should return zero | ||
│ └── then should return zero | ||
└── when the protocol fee has been set | ||
└── it should return the correct protocol fee | ||
└── then should return the correct protocol fee |
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
14 changes: 7 additions & 7 deletions
14
test/integration/concrete/comptroller/set-protocol-fee/setProtocolFee.tree
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
setProtocolFee.t.sol | ||
├── when the caller is not the admin | ||
│ └── it should revert | ||
└── when the caller is the admin | ||
├── given the caller is not the admin | ||
│ └── then should revert | ||
└── given the caller is the admin | ||
├── when the new protocol fee is the same as the current protocol fee | ||
│ ├── it should re-set the protocol fee | ||
│ └── it should emit a {SetProtocolFee} event | ||
│ ├── then should re-set the protocol fee | ||
│ └── and should emit a {SetProtocolFee} event | ||
└── when the new protocol fee is not the same as the current protocol fee | ||
├── it should set the new protocol fee | ||
└── it should emit a {SetProtocolFee} event | ||
├── then should set the new protocol fee | ||
└── and should emit a {SetProtocolFee} event | ||
|
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
14 changes: 7 additions & 7 deletions
14
test/integration/concrete/comptroller/toggle-flash-asset/toggleFlashAsset.tree
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
toggleFlashAsset.t.sol | ||
├── when the caller is not the admin | ||
│ └── it should revert | ||
└── when the caller is the admin | ||
├── given the caller is not the admin | ||
│ └── then should revert | ||
└── given the caller is the admin | ||
├── when the flag is not enabled | ||
│ ├── it should toggle the flash asset | ||
│ └── it should emit a {ToggleFlashAsset} event | ||
│ ├── then should toggle the flash asset | ||
│ └── and should emit a {ToggleFlashAsset} event | ||
└── when the flag is enabled | ||
├── it should toggle the flash asset | ||
└── it should emit a {ToggleFlashAsset} event | ||
├── then should toggle the flash asset | ||
└── and should emit a {ToggleFlashAsset} event |
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
26 changes: 13 additions & 13 deletions
26
test/unit/concrete/adminable/transfer-admin/transferAdmin.tree
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
transferAdmin.t.sol | ||
├── when the caller is not the admin | ||
│ └── it should revert | ||
└── when the caller is the admin | ||
├── when the admin is the same as the current admin | ||
│ ├── it should re-set the admin | ||
│ └── it should emit a {TransferAdmin} event | ||
└── when the admin is not the same as the current admin | ||
├── when the admin is the zero address | ||
│ ├── it should set the admin to the zero address | ||
│ └── it should emit a {TransferAdmin} | ||
└── when the admin is not the zero address | ||
├── it should set the new admin | ||
└── it should emit a {TransferAdmin} event and set the new admin | ||
├── given the caller is not the admin | ||
│ └── then should revert | ||
└── given the caller is the admin | ||
├── when new admin is same as current admin | ||
│ ├── then should re-set the admin | ||
│ └── and should emit a {TransferAdmin} event | ||
└── when new admin is not same as current admin | ||
├── when the new admin is the zero address | ||
│ ├── then should set the admin to the zero address | ||
│ └── and should emit a {TransferAdmin} | ||
└── when the new admin is not the zero address | ||
├── then should set the new admin | ||
└── and should emit a {TransferAdmin} event and set the new admin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
flashFee.t.sol | ||
├── when the flash fee has not been set | ||
│ └── it should return zero | ||
│ └── then should return zero | ||
└── when the flash fee has been set | ||
└── it should return the correct flash fee | ||
└── then should return the correct flash fee |
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
14 changes: 7 additions & 7 deletions
14
test/unit/concrete/comptroller/set-flash-fee/setFlashFee.tree
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
setFlashFee.t.sol | ||
├── when the caller is not the admin | ||
│ └── it should revert | ||
└── when the caller is the admin | ||
├── given the caller is not the admin | ||
│ └── then should revert | ||
└── given the caller is the admin | ||
├── when the new flash fee is the same as the current flash fee | ||
│ ├── it should re-set the flash fee | ||
│ └── it should emit a {SetFlashFee} event | ||
│ ├── then should re-set the flash fee | ||
│ └── and should emit a {SetFlashFee} event | ||
└── when the new flash fee is not the same as the current flash fee | ||
├── it should set the new flash fee | ||
└── it should emit a {SetFlashFee} event | ||
├── then should set the new flash fee | ||
└── and should emit a {SetFlashFee} event |