From 5835379ec30b1667c4e522db9d294c9b7bb8633a Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 26 四月 2022 12:00:31 +0800
Subject: [PATCH] SSBG Back up
---
force-app/main/default/classes/TydelikeAccControllerTest.cls | 108 ++++++++++++++++++++++++++----------------------------
1 files changed, 52 insertions(+), 56 deletions(-)
diff --git a/force-app/main/default/classes/TydelikeAccControllerTest.cls b/force-app/main/default/classes/TydelikeAccControllerTest.cls
index 12d4a7c..9b2d9a0 100644
--- a/force-app/main/default/classes/TydelikeAccControllerTest.cls
+++ b/force-app/main/default/classes/TydelikeAccControllerTest.cls
@@ -1,60 +1,56 @@
@isTest
-private class TydelikeAccControllerTest {
+public class TydelikeAccControllerTest {
static testMethod void testMethod1() {
- TydelikeAccount__c acc1 = new TydelikeAccount__c();
- acc1.name = '**';
- acc1.OwnerId = UserInfo.getUserId();
- acc1.TyCity__c = '鍖椾含';
- acc1.OfSkrap__c = false;
- acc1.TyAddress__c = '11111';
- acc1.TyPostCode__c = '123456';
- acc1.AssetBS3D__c = '123456';
- acc1.AssetBS2D__c = '123456';
- acc1.OCNServiceStaff__c = UserInfo.getUserId();
- acc1.AssetBS1D__c = '123456';
- acc1.ManagementCode_Ext__c = '123456';
- acc1.Sub_UseD__c = 'LED';
- acc1.AssetBS4D__c = '123456';
- acc1.EnglishNameD__c = '123456';
- acc1.DepartmentNameD__c = '123456';
- acc1.FacilityNameD__c = '123456';
- acc1.IndustryCD__c = 'Education';
- acc1.MarketVerticalsD__c = 'Education';
- acc1.CancelReasonD__c = '123456';
- acc1.ExportRegulatedCustomer__c = true;
- acc1.Province__c = '鍖椾含';
- acc1.Whether_OEM__c = true;
- acc1.GlobalAccountName__c = '123456';
- acc1.NationalEnterpriseUser__c = true;
- acc1.DivisionName_D__c = '123456';
- acc1.UseD__c = '(Education)Education';
- acc1.UserType__c = 'OEM瀹㈡埛';
- acc1.WebsiteD__c = 'http://1';
- acc1.KeyAccount__c = 'Large Account';
- acc1.ProductSegment__c = 'BS';
- acc1.FaxD__c = '123456';
- acc1.Remark__c = '123456';
- acc1.DealerSelectOwner__c = UserInfo.getUserId();
- acc1.PhoneD__c = '15555555555';
- insert acc1;
-
- 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';
- tycon1.EnglishAddress__c = '111111';
- tycon1.ContactEnglishName__c = '111111';
- insert tycon1;
- System.debug(tycon1);
-
- PageReference page = new PageReference('/apex/TydelikeAcc?tyacId=' + acc1.Id + '&tycoId=' + tycon1.Id);
- System.Test.setCurrentPage(page);
- TydelikeAccController controller = new TydelikeAccController();
- controller.init();
- controller.save();
+ TydelikeAccount__c tyactest = new TydelikeAccount__c();
+ tyactest.Name = 'test';
+ tyactest.AssetBS3D__c = 'test';
+ tyactest.AssetBS2D__c = 'test';
+ tyactest.AssetBS1D__c = 'test';
+ tyactest.AssetBS5D__c = 'test';
+ tyactest.ManagementCode_Ext__c = 'test';
+ tyactest.Sub_UseD__c = 'LED';
+ tyactest.EnglishNameD__c = 'test';
+ tyactest.DepartmentNameD__c = 'test';
+ tyactest.FacilityNameD__c = 'test';
+ tyactest.MarketVerticalsD__c = 'Education';
+ tyactest.CancelReasonD__c = 'test';
+ tyactest.ExportRegulatedCustomer__c = false;
+ tyactest.Province__c = '鍖椾含';
+ tyactest.Whether_OEM__c = false;
+ tyactest.GlobalAccountName__c = 'test';
+ tyactest.DivisionName_D__c = 'test';
+ tyactest.UseD__c = 'IVF';
+ //tyactest.WebsiteD__c = '';
+ tyactest.TyCity__c = 'PII';
+ tyactest.TyAddress__c = 'PII';
+ tyactest.TyPostCode__c = 'PII';
+ tyactest.ProductSegment__c = 'BS';
+ tyactest.FaxD__c = 'test';
+ tyactest.Remark__c = 'PII';
+ //tyactest.DealerSelectOwner__c = 'OT-IT';
+ tyactest.PhoneD__c = '13455556666';
+ tyactest.NationalEnterpriseUser__c = false;
+ tyactest.AssetBS4D__c = 'test';
+ insert tyactest;
+
+ TydelikeContact__c tycotest = new TydelikeContact__c();
+ tycotest.Name = 'test';
+ tycotest.TyAddress__c = 'test';
+ tycotest.TyFaxD__c = 'test';
+ tycotest.TyPhoneD__c = '13566667777';
+ tycotest.TyPostcode__c = '5000000';
+ tycotest.EnglishAddress__c = 'test';
+ tycotest.ContactEnglishName__c = 'test';
+ insert tycotest;
+
+ String url = ApexPages.currentPage().getParameters().put('tyacId',tyactest.Id);
+ url = ApexPages.currentPage().getParameters().put('tycoId',tycotest.Id);
+
+ Test.startTest();
+ TydelikeAccController scc = new TydelikeAccController();
+ scc.init();
+ scc.save();
+ Test.stopTest();
}
+
}
\ No newline at end of file
--
Gitblit v1.9.1