public void Create_sweepstake_providing_start_block_list_of_teams_prize_allocation_and_end_date() { var contract = SetupValidSweepstake(); persistentState.GetAddress("Owner").Should().Be(contractOwnerAddress); persistentState.GetString("TeamsCsv").Should().Be("germany,brazil,england,argentina"); persistentState.GetUInt64List("PrizesSatoshis")[0].Should().Be(14ul * SatoshiMuliplier); persistentState.GetUInt64List("PrizesSatoshis")[1].Should().Be(4ul * SatoshiMuliplier); persistentState.GetUInt64List("PrizesSatoshis")[2].Should().Be(2ul * SatoshiMuliplier); }
public void Approve_Approves_Mapping() { state.SetStruct($"MappingInfo:{secondaryAddress}", new MappingInfo { Primary = primaryAddress, Status = (int)Status.Pending }); mContractState.Setup(x => x.Message).Returns(new Message(contractAddress, ownerAddress, 0)); var contract = new AddressMapper(mContractState.Object, ownerAddress); contract.Approve(secondaryAddress); Assert.Equal(secondaryAddress, state.GetAddress($"SecondaryAddress:{primaryAddress}")); Assert.Equal(new MappingInfo { Primary = primaryAddress, Status = (int)Status.Approved }, state.GetStruct <MappingInfo>($"MappingInfo:{secondaryAddress}")); mContractLogger.Verify(m => m.Log(mContractState.Object, new AddressMappedLog { Primary = primaryAddress, Secondary = secondaryAddress })); }