QUnit.test( "EPO basic search test", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getEpoUrl("car");
  var expected = 'http://ops.epo.org/3.2/rest-services/published-data/search/abstract,biblio,full-cycle?q=ti%20all%20"car"&Range=1-100';
    assert.ok( result == expected, "Passed!" );
  });


  QUnit.test( "EPO advanced search (inventor) test", function( assert ) {
    var uut = PatentHelper();
    var result = uut.getEpoUrl(undefined,undefined,undefined,"masoud");
    var expected = 'http://ops.epo.org/3.2/rest-services/published-data/search/abstract,biblio,full-cycle?q=in%3Dmasoud&Range=1-100';
      assert.ok( result == expected, "Passed!" );
    });


    QUnit.test( "EPO advanced search (assignee organization) test", function( assert ) {
      var uut = PatentHelper();
      var result = uut.getEpoUrl(undefined,undefined,undefined,undefined,"florida international university");
      var expected = 'http://ops.epo.org/3.2/rest-services/published-data/search/abstract,biblio,full-cycle?q=in%3Dflorida international university&Range=1-100';
        assert.ok( result == expected, "Passed!" );
      });


QUnit.test( "USPTO basic search test", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getUsptoUrl("car");
  var expected = 'http://www.patentsview.org/api/patents/query?q={"_and":[{"_text_all":{"patent_title":"car"}}]}&o={"page":2,"per_page":10000}&f=["patent_date","patent_title","patent_number","patent_number","inventor_first_name", "inventor_last_name","patent_type","assignee_organization","assignee_first_name","assignee_last_name","patent_kind","patent_year","cited_patent_title","cited_patent_number","patent_abstract"]';
    assert.ok( result == expected, "Passed!" );  
  });

QUnit.test( "USPTO advanced search (date) test", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getUsptoUrl("car", "Mon Jan 01 2018 00:00:00 GMT-0500 (Eastern Standard Time)", "Wed Jan 03 2018 00:00:00 GMT-0500 (Eastern Standard Time)");
  var expected = 'http://www.patentsview.org/api/patents/query?q={"_and":[{"_gte":{"patent_date":"2018-01-01"}},{"_lte":{"patent_date":"2018-01-03"}},{"_text_all":{"patent_title":"car"}}]}&o={"page":2,"per_page":10000}&f=["patent_date","patent_title","patent_number","patent_number","inventor_first_name", "inventor_last_name","patent_type","assignee_organization","assignee_first_name","assignee_last_name","patent_kind","patent_year","cited_patent_title","cited_patent_number","patent_abstract"]';
    assert.ok( result == expected, "Passed!" );  
  });

QUnit.test( "USPTO advanced search (inventor) test", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getUsptoUrl(undefined, undefined, undefined, "s. masoud");
  var expected = 'http://www.patentsview.org/api/patents/query?q={"_and":[{"inventor_first_name":["s. masoud"]}]}&o={"page":2,"per_page":10000}&f=["patent_date","patent_title","patent_number","patent_number","inventor_first_name", "inventor_last_name","patent_type","assignee_organization","assignee_first_name","assignee_last_name","patent_kind","patent_year","cited_patent_title","cited_patent_number","patent_abstract"]';
    assert.ok( result == expected, "Passed!" );  
  });

QUnit.test( "USPTO advanced search (assignee organization) test", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getUsptoUrl(undefined, undefined, undefined, undefined, undefined, "THE FLORIDA INTERNATIONAL UNIVERSITY BOARD OF TRUSTEES");
  var expected = 'http://www.patentsview.org/api/patents/query?q={"_and":[{"assignee_organization":["THE FLORIDA INTERNATIONAL UNIVERSITY BOARD OF TRUSTEES"]}]}&o={"page":2,"per_page":10000}&f=["patent_date","patent_title","patent_number","patent_number","inventor_first_name", "inventor_last_name","patent_type","assignee_organization","assignee_first_name","assignee_last_name","patent_kind","patent_year","cited_patent_title","cited_patent_number","patent_abstract"]';
    assert.ok( result == expected, "Passed!" );
  });

QUnit.test( "getYelpURL returns a URL with term and location", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getYelpUrl("Hotel","Miami");
  var expected = 'https://cors-anywhere.herokuapp.com/https://api.yelp.com/v3/businesses/search?term=Hotel&location=Miami';
    assert.ok( result == expected, "Passed!" );
  });
QUnit.test( "getYelpURL returns a URL with term", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getYelpUrl("Hotel","");
  var expected = 'https://cors-anywhere.herokuapp.com/https://api.yelp.com/v3/businesses/search?term=Hotel';
    assert.ok( result == expected, "Passed!" );
  });
QUnit.test( "getYelpURL returns a URL with location", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getYelpUrl("","Miami");
  var expected = 'https://cors-anywhere.herokuapp.com/https://api.yelp.com/v3/businesses/search?location=Miami';
    assert.ok( result == expected, "Passed!" );
  });
QUnit.test( "getYelpURL returns a blank URL if nothing is given", function( assert ) {
  var uut = PatentHelper();
  var result = uut.getYelpUrl("","");
    assert.ok( !result, "Passed!" );
  });
QUnit.test( "YelpKey exists", function( assert ) {
  var uut = PatentHelper();
  var result = uut.YelpKey;
    assert.ok( result, "Passed!" );
  });
  