Exemple #1
0
        public void Parse4()
        {
            var info = VariableAssignmentLine.Parse(" provisionContext.AvailableBalance = responseAvailableBalance.Value.GetValueOrDefault(); ");

            Assert.AreEqual("provisionContext.AvailableBalance", info.VariableName);
            Assert.IsNull(info.VariableTypeName);
            Assert.AreEqual("responseAvailableBalance.Value.GetValueOrDefault()", info.AssignedValue);
        }
Exemple #2
0
        public void Parse1()
        {
            var info = VariableAssignmentLine.Parse(" var  a = b; ");

            Assert.AreEqual("a", info.VariableName);
            Assert.AreEqual("var", info.VariableTypeName);
            Assert.AreEqual("b", info.AssignedValue);
        }
Exemple #3
0
        public void Parse2()
        {
            var info = VariableAssignmentLine.Parse(" List<object>  a = b.call(77,665, 8); ");

            Assert.AreEqual("a", info.VariableName);
            Assert.AreEqual("List<object>", info.VariableTypeName);
            Assert.AreEqual("b.call(77,665, 8)", info.AssignedValue);
        }
Exemple #4
0
        public void Parse0_await()
        {
            var info = VariableAssignmentLine.Parse("  a = await b;  ");

            Assert.AreEqual("a", info.VariableName);
            Assert.AreEqual(null, info.VariableTypeName);
            Assert.AreEqual("await b", info.AssignedValue);
        }