Esempio n. 1
0
        public void EmptyContractVisibilityTest()
        {
            var function = new ContractFunction()
            {
                Name = "Test"
            };

            function.GenerateCode(new Indentation());
        }
Esempio n. 2
0
        public void InvalidContractNameTest()
        {
            var function = new ContractFunction()
            {
                Name = "123"
            };

            function.GenerateCode(new Indentation());
        }
Esempio n. 3
0
        public void ModificationTypeXorIsPayableTest2()
        {
            var function = new ContractFunction()
            {
                Name             = "Test",
                Visibility       = Visibility.Public,
                ModificationType = ModificationType.View,
                IsPayable        = true
            };

            function.GenerateCode(new Indentation());
        }
Esempio n. 4
0
 public void GenerateCodeTest(ContractFunction function, Indentation indentation, string expected)
 {
     System.Diagnostics.Contracts.Contract.Requires(function != null);
     Assert.AreEqual(expected, function.GenerateCode(indentation));
 }
Esempio n. 5
0
        public void EmptyContractNameTest()
        {
            var function = new ContractFunction();

            function.GenerateCode(new Indentation());
        }