//
// Generated by JSON2Apex http://json2apex.herokuapp.com/
//

@IsTest
public class QBTermJSON_Test {
	
	// This test method should give 100% coverage
	static testMethod void testParse() {
		String json = '{'+
		'    \"QueryResponse\": {'+
		'        \"Term\": ['+
		'            {'+
		'                \"Name\": \"Due on receipt\",'+
		'                \"Active\": true,'+
		'                \"Type\": \"STANDARD\",'+
		'                \"DueDays\": 0,'+
		'                \"DiscountDays\": 0,'+
		'                \"domain\": \"QBO\",'+
		'                \"sparse\": false,'+
		'                \"Id\": \"1\",'+
		'                \"SyncToken\": \"0\",'+
		'                \"MetaData\": {'+
		'                    \"CreateTime\": \"2018-12-19T16:11:00-08:00\",'+
		'                    \"LastUpdatedTime\": \"2018-12-19T16:11:00-08:00\"'+
		'                }'+
		'            }'+
		'        ],'+
		'        \"startPosition\": 1,'+
		'        \"maxResults\": 1'+
		'    },'+
		'    \"time\": \"2023-04-26T04:42:09.686-07:00\"'+
		'}';
		QBTermJSON r = QBTermJSON.parse(json);
		System.assert(r != null);

		json = '{\"TestAMissingObject\": { \"TestAMissingArray\": [ { \"TestAMissingProperty\": \"Some Value\" } ] } }';
		QBTermJSON objQBTermJSON = new QBTermJSON(System.JSON.createParser(json));
		System.assert(objQBTermJSON != null);
		System.assert(objQBTermJSON.QueryResponse == null);
		System.assert(objQBTermJSON.time_Z == null);

		json = '{\"TestAMissingObject\": { \"TestAMissingArray\": [ { \"TestAMissingProperty\": \"Some Value\" } ] } }';
		QBTermJSON.MetaData objMetaData = new QBTermJSON.MetaData(System.JSON.createParser(json));
		System.assert(objMetaData != null);
		System.assert(objMetaData.CreateTime == null);
		System.assert(objMetaData.LastUpdatedTime == null);

		json = '{\"TestAMissingObject\": { \"TestAMissingArray\": [ { \"TestAMissingProperty\": \"Some Value\" } ] } }';
		QBTermJSON.QueryResponse objQueryResponse = new QBTermJSON.QueryResponse(System.JSON.createParser(json));
		System.assert(objQueryResponse != null);
		System.assert(objQueryResponse.Term == null);
		System.assert(objQueryResponse.startPosition == null);
		System.assert(objQueryResponse.maxResults == null);

		json = '{\"TestAMissingObject\": { \"TestAMissingArray\": [ { \"TestAMissingProperty\": \"Some Value\" } ] } }';
		QBTermJSON.Term objTerm = new QBTermJSON.Term(System.JSON.createParser(json));
		System.assert(objTerm != null);
		System.assert(objTerm.Name == null);
		System.assert(objTerm.Active == null);
		System.assert(objTerm.Type == null);
		System.assert(objTerm.DueDays == null);
		System.assert(objTerm.DiscountDays == null);
		System.assert(objTerm.domain == null);
		System.assert(objTerm.sparse == null);
		System.assert(objTerm.Id == null);
		System.assert(objTerm.SyncToken == null);
		System.assert(objTerm.MetaData == null);
	}
}