From 928399eceec50e3d37ea08669a12789a9410a9d2 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期二, 22 十一月 2022 16:51:16 +0800
Subject: [PATCH] 111

---
 force-app/main/default/classes/Product2HandlerTest.cls |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/force-app/main/default/classes/Product2HandlerTest.cls b/force-app/main/default/classes/Product2HandlerTest.cls
index 4ea43c7..a2bf8e7 100644
--- a/force-app/main/default/classes/Product2HandlerTest.cls
+++ b/force-app/main/default/classes/Product2HandlerTest.cls
@@ -40,6 +40,41 @@
         System.assertEquals('22', product2s[0].StorageStatus__c);
 
 	}
+        @isTest
+        static void insertProduct2_3() {
+                // 浜у搧
+        List<String> noNewList = new List<String>();
+        Product2 pro5 = new Product2(Asset_Model_No__c = 'AC20221108',
+                Name='name05',IsActive=true,Family='SP',
+                Fixture_Model_No__c='n05',Serial_Lot_No__c='S/N tracing',
+                Fixture_Model_No_T__c = 'n05',
+                ProductCode_Ext__c='pc05',Manual_Entry__c=false,
+                StorageStatus__c = '',StorageStatusNo__c = 22,
+                WhiteSpace__c = true);
+        insert pro5;
+        noNewList.add(pro5.Asset_Model_No__c);
+        List<Product2> prdList = [select Id, Name,Asset_Model_No__c,MDM_Name__c,
+                                    Maintenance_Price_Year__c,Extend_new_product_gurantee_MD__c,
+                                    Extend_Gurantee_Start_MD__c,Extend_Gurantee_End_MD__c,
+                                    Entend_gurantee_period_MD__c,Extend_new_product_gurantee__c,
+                                    Extend_Gurantee_Start__c,Extend_Gurantee_End__c,Entend_gurantee_period__c,
+                                    CanNotCancelledGurantee__c,Service_Category1__c,
+                                    Service_Category2__c,Service_Category3__c,
+                                    Service_Category4__c,Service_Category5__c,
+                                    Service_Category6__c,Service_Category7__c,
+                                    Can_Repair__c,RepairListPriceLevelA__c,
+                                    RepairListPriceLevelB__c,RepairListPriceLevelC__c,
+                                    PartSupplyFinishDate__c,EndSaleDate__c,ProductClass__c,ProductCategory__c,
+                                    Period_Filter_Classify1__c,Period_Filter_Classify2__c
+                                    from Product2
+                                    where Asset_Model_No__c in :noNewList
+                                    order by LastModifiedDate desc];
+
+        List<Product2> product2s = [select Id,Name,StorageStatus__c from Product2];
+
+        System.assertEquals(1, product2s.size());
+        System.assertEquals('22', product2s[0].StorageStatus__c);
+        }
 
         //SFDC鍋滄棰勮  lt  20210922 add start
         @isTest 

--
Gitblit v1.9.1