public void CreateStandardMarket_Throws_InvalidMarket() { var createParams = new object[] { 11U, Owner, false, false, false, false }; SetupCreate <OpdexStandardMarket>(CreateResult.Failed(), 0, createParams); var deployer = CreateNewOpdexMarketDeployer(); deployer .Invoking(d => d.CreateStandardMarket(Owner, 11, false, false, false, false)) .Should().Throw <SmartContractAssertException>() .WithMessage("OPDEX: INVALID_MARKET"); }
public void CreateStakingMarket_Throws_InvalidMarket() { var createParams = new object[] { 3U, StakingToken }; SetupCreate <OpdexStakingMarket>(CreateResult.Failed(), 0, createParams); State.SetContract(StakingToken, true); var deployer = CreateNewOpdexMarketDeployer(); deployer .Invoking(d => d.CreateStakingMarket(StakingToken)) .Should().Throw <SmartContractAssertException>() .WithMessage("OPDEX: INVALID_MARKET"); }
public void Constructor_CreateReturnsFailedResult_ThrowsAssertException() { this.mTransactionExecutor.Setup(m => m.Create <StandardToken>(this.mContractState.Object, 0, new object[] { this.totalSupply, this.name, this.symbol }, It.IsAny <ulong>())).Returns(CreateResult.Failed()); Assert.Throws <SmartContractAssertException>(() => this.Create(TokenType.StandardToken)); this.mTransactionExecutor.Verify(m => m.Create <StandardToken>(this.mContractState.Object, 0, new object[] { this.totalSupply, this.name, this.symbol }, It.IsAny <ulong>()), Times.Once); }