Advertisement
miCRoScoPiCeaRthLinG

SelectPriceBook Test Class

Oct 15th, 2013
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @isTest
  2. public class SelectPriceBookTestClass {
  3.    
  4.     static testMethod void validateSelectPriceBook() {
  5.        
  6.         List<Opportunity> opps = new List<Opportunity>();
  7.        
  8.         // New Opp 1
  9.         Opportunity opp1 = new Opportunity();
  10.         opp1.Name = 'Test Opp';
  11.         opp1.Campus__c = 'ATL';
  12.         opp1.StageName = 'Qualified';
  13.         opp1.CloseDate = Date.newInstance( 2013, 8, 30 );  
  14.        
  15.         // Add
  16.         opps.add( opp1 );
  17.        
  18.         // New Opp 2
  19.         Opportunity opp2 = new Opportunity();
  20.         opp2.Name = 'Test Opp';
  21.         opp2.Campus__c = 'NYC';
  22.         opp2.StageName = 'Closed';
  23.         opp2.CloseDate = Date.newInstance( 2013, 5, 20 );      
  24.        
  25.         // Add
  26.         opps.add( opp2 );
  27.        
  28.         test.startTest();
  29.        
  30.         // Insert
  31.         insert opps;    
  32.        
  33.         test.stopTest();
  34.        
  35.     }
  36. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement