public void GetMemberNamesForColorReference() { string[] expected = new string[] { "System", "Drawing", "Color", "Red" }; string code = "self.BackColor = System::Drawing::Color.Red"; SimpleAssignmentExpression assignment = RubyParserHelper.GetSimpleAssignmentExpression(code); Assert.AreEqual(expected, RubyControlFieldExpression.GetMemberNames(assignment.Right as MethodCall)); }
public void GetMemberNamesForButtonPropertyReference() { string[] expected = new string[] { "@button1", "Location" }; string code = "@button1.Location = System::Drawing::Point.new(0, 0)"; SimpleAssignmentExpression assignment = RubyParserHelper.GetSimpleAssignmentExpression(code); Assert.AreEqual(expected, RubyControlFieldExpression.GetMemberNames(assignment.Left as AttributeAccess)); }
public void GetMemberNamesForFormClientSizePropertyReference() { string[] expected = new string[] { "self", "ClientSize" }; string code = "self.ClientSize = System::Drawing::Size.new(300, 400)"; SimpleAssignmentExpression assignment = RubyParserHelper.GetSimpleAssignmentExpression(code); Assert.AreEqual(expected, RubyControlFieldExpression.GetMemberNames(assignment.Left as AttributeAccess)); }
public void GetMemberNames() { string[] expected = new string[] { "a", "b" }; string code = "a.b = 0"; SimpleAssignmentExpression assignment = RubyParserHelper.GetSimpleAssignmentExpression(code); Assert.AreEqual(expected, RubyControlFieldExpression.GetMemberNames(assignment.Left as AttributeAccess)); }