Module:Professional wrestling profiles/testcases

-- Example Unit tests for Module:Professional wrestling. Click talk page to run tests. local p = require('Module:UnitTests')

function p:test_profiles_blank self:preprocess_equals(, ); self:preprocess_equals(, ); end

function p:test_profiles_single self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Cagematch.net"); self:preprocess_equals('', "John Cena's profile at Cagematch.net"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Wrestlingdata.com"); self:preprocess_equals('', "John Cena's profile at Wrestlingdata.com"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Internet Wrestling Database"); self:preprocess_equals('', "John Cena's profile at Internet Wrestling Database"); end

function p:test_profiles_double self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Cagematch.net, Wrestlingdata.com"); self:preprocess_equals('', "John Cena's profile at Cagematch.net, Wrestlingdata.com"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Cagematch.net, Internet Wrestling Database"); self:preprocess_equals('', "John Cena's profile at Cagematch.net, Internet Wrestling Database"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Wrestlingdata.com, Internet Wrestling Database"); self:preprocess_equals('', "John Cena's profile at Wrestlingdata.com, Internet Wrestling Database"); end

function p:test_profiles_triple self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Cagematch.net, Wrestlingdata.com, Internet Wrestling Database"); self:preprocess_equals('', "John Cena's profile at Cagematch.net, Wrestlingdata.com, Internet Wrestling Database"); end

function p:test_wrestling_titles self:preprocess_equals('', "Stanislaus Zbyszko's profile at Wrestling-Titles.com"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Wrestling-Titles.com"); self:preprocess_equals('', "Stanislaus Zbyszko's profile at Wrestling-Titles.com"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Wrestling-Titles.com"); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

function p:test_cage_match self:preprocess_equals('', "John Cena's profile at Cagematch.net"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Cagematch.net"); self:preprocess_equals('', "John Cena's profile at Cagematch.net"); self:preprocess_equals('', "Professional wrestling profiles/testcases's profile at Cagematch.net"); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

function p:test_rohroster local url = "http://www.rohwrestling.com/wrestlers/matt-sydal"; self:preprocess_equals('', "[" .. url .. " Matt Sydal]'s Ring of Honor profile"); self:preprocess_equals('', "[" .. url .. " Professional wrestling profiles/testcases]'s Ring of Honor profile"); self:preprocess_equals('', "[" .. url .. " Matt Sydal]'s Ring of Honor profile"); self:preprocess_equals('', "[" .. url .. " Professional wrestling profiles/testcases]'s Ring of Honor profile"); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

function p:test_njpw local linkformat = "[%s %s]'s New Japan Pro-Wrestling profile"; local url = "http://www.njpw.co.jp/english/data/detail_profile.php?f=932"; local names = {"Matt Sydal", "Professional wrestling profiles/testcases"}; local values = {string.format(linkformat, url, names[1]), string.format(linkformat, url, names[2])}; local template = "njpw"; local id = "932"; self:preprocess_equals('', values[1]); self:preprocess_equals('', values[1]); self:preprocess_equals('', values[2]); self:preprocess_equals('', values[2]); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

function p:test_gfw local linkformat = "[%s %s]'s Global Force Wrestling profile"; local url = "http://globalforcewrestling.com/roster/scottsteiner/"; local names = {"Scott Steiner", "Professional wrestling profiles/testcases"}; local values = {string.format(linkformat, url, names[1]), string.format(linkformat, url, names[2])}; local template = "gfw"; local id = "scottsteiner"; self:preprocess_equals('', values[1]); self:preprocess_equals('', values[1]); self:preprocess_equals('', values[2]); self:preprocess_equals('', values[2]); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

function p:test_dgusa local linkformat = "[%s %s] at the official Dragon Gate USA website"; local url = "http://dgusa.tv/bio/homicide"; local names = {"Homicide", "Professional wrestling profiles/testcases"}; local values = {string.format(linkformat, url, names[1]), string.format(linkformat, url, names[2])}; local template = "dragongateusa"; local id = "homicide"; self:preprocess_equals('', values[1]); self:preprocess_equals('', values[1]); self:preprocess_equals('', values[2]); self:preprocess_equals('', values[2]); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

function p:test_chikara local linkformat = "[%s %s] at the official Chikara website"; local url = "http://chikarapro.com/chikara-roster/homicide"; local names = {"Homicide", "Professional wrestling profiles/testcases"}; local values = {string.format(linkformat, url, names[1]), string.format(linkformat, url, names[2])}; local template = "chikara"; local id = "homicide"; self:preprocess_equals('', values[1]); self:preprocess_equals('', values[1]); self:preprocess_equals('', values[2]); self:preprocess_equals('', values[2]); self:preprocess_equals('', ""); self:preprocess_equals('', ""); end

return p