The "if invaded" qualifier is fair, but what I heard from Danish authorities was that they would not wait to be fired upon. They said, if US forces came, then Denmark would "shoot first" regardless of whether the US had fired a shot.
If Mexico said they wanted Texas and sent troops across the border, I assure you force would be rapidly used. By more than just CBP.