Here you are not gonna create a virus, but rather create something that will alert your anti-virus program.
Here is how to do it.
Open up Notepad, paste the following text into it:
X5O!P%@AP[4PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
Then save the file.
Your anti-virus program should catch it immediately. If nothing happens, then I say it’s about time to get a new anti-virus program. ;)
Ref: http://www.howtogeek.com/howto/34677/stupid-geek-tricks-make-your-own-fake-virus-with-notepad/