Ejemplo n.º 1
0
        public async Task TestValidateBeContractWithDuplicatedInputsFailAsync()
        {
            var contract = BeContractsMock.GetMathemathicFunction();

            contract.Inputs[0].Key = "B";
            try
            {
                await Validators.ValidateBeContract(contract);
            }
            catch (BeContractException ex)
            {
                var exc = new BeContractException("Duplicated key in GetMathemathicFunction contract for Inputs B, B");
                Assert.AreEqual(ex.Message, exc.Message);
            }
        }
Ejemplo n.º 2
0
        public async Task TestValidateBeContractWithDuplicatedInputsSuccess()
        {
            var contract = BeContractsMock.GetMathemathicFunction();

            Assert.IsTrue(await Validators.ValidateBeContract(contract));
        }