The error is that

if (testVariable = 10)   should be   if (testVariable == 10)

== is a comparison as opposed to an equal.