Check the fuel pump by removing the fuel line from the carb, put it in a catch jar and crank the engine.
Fuel gushes out the pump is OK.
There are speck somewhere for it you are supposed to shove a long clear tube on the end and it pumps "X" inches of head.
Try some starter fluid down the carb throat, if the mower runs till it burns out and the pump is pumping and the float bowl is full of fuel then you are left with the fuel solenoid or valves.
When you turn the ignition on & off the solenoid should open & close, if not then confirm the wiring before you consign it to the trash can as the aint cheap.
If the solenoid is working properly then pull the rocker cover off and verify the valves are moving in sync with the piston.