@isTest
private class TydelikeACControllerTest {
    static testMethod void testMethod1() {
        TydelikeAccount__c acc1 = new TydelikeAccount__c(
            name = '*',
            OwnerId = UserInfo.getUserId(),
            TyCity__c = '北京',
            OfSkrap__c = false,
            TyAddress__c = '11111',
            TyPostCode__c = '123456'
        );
        TydelikeAccount__c acc2 = new TydelikeAccount__c(
            name = '*',
            OwnerId = UserInfo.getUserId(),
            TyCity__c = '北京',
            OfSkrap__c = false,
            TyAddress__c = '11111',
            TyPostCode__c = '123456'
        );
        TydelikeAccount__c acc3 = new TydelikeAccount__c(
            name = '*',
            OwnerId = UserInfo.getUserId(),
            TyCity__c = '北京',
            OfSkrap__c = false,
            TyAddress__c = '11111',
            TyPostCode__c = '123456'
        );
        insert new List<TydelikeAccount__c> {acc1,acc2,acc3};

        TydelikeContact__c tycon1 = new TydelikeContact__c();
        	tycon1.name = '*';
        	tycon1.OfSkrap__c = false;
        	tycon1.TydelikeAccount__c = acc1.Id;
        	tycon1.TyAddress__c = '11111';
        	tycon1.TyFaxD__c = '1111';
        	tycon1.TyPhoneD__c = '15555555555';
        	tycon1.TyPostcode__c = '111111';
        insert tycon1;

        TydelikeACController  controller = new TydelikeACController();

        controller.init();
        controller.getDatalineSize();

        /*controller.tycontactname = '*';*/
        controller.tycountname = '*';
        controller.tycountcity = '北京';
        controller.searchTy();

        controller.dataLines[0].bondel = true;
        controller.dataLines[1].bondel = true;
        controller.setOfSkrapBtn();
    }

    static testMethod void testMethod2() {
        TydelikeAccount__c acc1 = new TydelikeAccount__c(
            name = '*',
            OwnerId = UserInfo.getUserId(),
            TyCity__c = '北京',
            OfSkrap__c = false,
            TyAddress__c = '11111',
            TyPostCode__c = '123456'
        );
        TydelikeAccount__c acc2 = new TydelikeAccount__c(
            name = '*',
            OwnerId = UserInfo.getUserId(),
            TyCity__c = '北京',
            OfSkrap__c = false,
            TyAddress__c = '11111',
            TyPostCode__c = '123456'
        );
        TydelikeAccount__c acc3 = new TydelikeAccount__c(
            name = '*',
            OwnerId = UserInfo.getUserId(),
            TyCity__c = '北京',
            OfSkrap__c = false,
            TyAddress__c = '11111',
            TyPostCode__c = '123456'
        );
        insert new List<TydelikeAccount__c> {acc1,acc2,acc3};

        TydelikeContact__c tycon1 = new TydelikeContact__c();
            tycon1.name = '*';
            tycon1.OfSkrap__c = false;
            tycon1.TydelikeAccount__c = acc1.Id;
            tycon1.TyAddress__c = '11111';
            tycon1.TyFaxD__c = '1111';
            tycon1.TyPhoneD__c = '15555555555';
            tycon1.TyPostcode__c = '111111';
        insert tycon1;

        TydelikeContact__c tycon2 = new TydelikeContact__c();
            tycon2.name = '*';
            tycon2.OfSkrap__c = false;
            tycon2.TydelikeAccount__c = acc1.Id;
            tycon2.TyAddress__c = '11111';
            tycon2.TyFaxD__c = '1111';
            tycon2.TyPhoneD__c = '15555555555';
            tycon2.TyPostcode__c = '111111';
        insert tycon2;

        TydelikeACController  controller = new TydelikeACController();

        controller.init();
        controller.getDatalineSize();

        controller.tycontactname = '*';
        controller.tycountname = '*';
        controller.tycountcity = '北京';
        controller.searchTy();

        controller.dataLines[0].bondel = true;
        controller.setOfSkrapBtn();
    }
}