public void TestExtractAuthor() { YT2013Parser urlWrap = new YT2013Parser(dataURL); String author = urlWrap.extractAuthor(); Assert.AreEqual("didipohu1", author); }
private void AnalyseVideoInfoURL(String aURLInfo) { IUrlParser urlParser = new YT2013Parser(aURLInfo); String status = urlParser.extractStatus(); if (status.Equals("ok")) { this.title = urlParser.extractTitle(); this.author = urlParser.extractAuthor(); this.length = urlParser.extractLengthSeconds(); this.AnalyseVideoStreamMap(urlParser.extractStreamMap()); } else if(status.Equals("fail")) { String errno = urlParser.extractErrNo(); String reason = urlParser.extractReason(); MessageBox.Show("Error number" + errno + " Reason: " + reason, "Cannot load Youtube Video File"); } }