I'll try to summarize this article written by a respected and knowledgeable member of the community, but I'd read this if you want a more in-depth coverage on this topic:
I don't think you can use the Register Client scripts (in a Sandbox scenario) on the server side because of the limitations of the Sandbox.
BTW...ExecuteOrDelayUntilScriptLoaded() is just a part of the SOD framework and is loaded by init.js. If your test() method is relying on functionality exposed by your own scripts (i.e. not SharePoint provided scripts, for example jQuery), then you can also use the SOD framework, but you must ensure that your custom script file is setup to participate in it. You do this by putting a call to NotifyScriptLoadedAndExecuteWaitingJobs() at the end of your file, which lets the SOD framework know that your file has finished loading, and any dependent scripts can now run.
Here is another good resource covering SOD: