@IsTestprivateclassTest_B25_Reservation{@isTestprivatestaticvoidtestDimensionJunctions(){B25__Reservation__creservation=newB25__Reservation__c();reservation.B25__Start__c=DateTime.now();reservation.B25__End__c=DateTime.now().addHours(1);Database.insert(reservation);Lesson_Group_Contact__cyourobject=newLesson_Group_Contact__c();//replace this with the name of your objectyourobject.Name='a';// if this is field is an auto number you dont need this.Database.insert(yourobject);Reservation_Lesson_Group_Contact__cresYourobject=newReservation_Lesson_Group_Contact__c();//replace with the name of your dimension junction objectresYourobject.Reservation__c=reservation.Id;resYourobject.Lesson_Group_Contact__c=yourobject.Id;//replace this with the name of the lookup on the dimension junctionDatabase.insert(resYourobject);System.assertEquals(1,[SELECTIdFROMB25__Reservation__c].size());}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.