@isTest
private class infrastructureProjectRelatedOppTest {
    static testMethod void test01() {
        RecordType rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName = 'Hp'];
        Account acc = new Account();
        acc.RecordTypeId = rectCo.Id;
        acc.Name = 'HP test1';
        acc.Assume_Change__c = true;
        insert acc;
        Infrastructure_Project__c jijian = new Infrastructure_Project__c();
        jijian.Name = 'ceshi jijian ';
        jijian.OCSM_Hospital__c = acc.Id;
        insert jijian;
        Opportunity opp = new Opportunity();
        opp.Name = 'test询价';
        opp.StageName = '引合';
        opp.SAP_Send_OK__c = false;
        opp.CloseDate = Date.newInstance(2023, 9, 15);
        opp.Hospital__c = acc.Id;
        insert opp;
        infrastructureProjectRelatedOpController.selectInfrastructureProjectById(String.valueOf(jijian.Id));
        infrastructureProjectRelatedOpController.selectoppByAccountId(String.valueOf(opp.Hospital__c));
        infrastructureProjectRelatedOpController.selectoppByOpportunityNoc(String.valueOf(opp.Hospital__c),'te');
        opp.Infrastructure_Project__c = jijian.Id;
        List<Opportunity> listName = new List<Opportunity>();
        listName.add(opp);
        String jon = JSON.serialize(listName);
        infrastructureProjectRelatedOpController.saveOppInfrastructureProject(jon);
    }
}