• amrit bansal
  • NEWBIE
  • 0 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

VF Page:
<apex:page controller="hb1" >
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="save" action="{!save}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:inputField value="{!alsat.name}"/>
<apex:inputField value="{!alsat.Date_and_Time_of_allotment__c}"/>
<apex:inputField value="{!alsat.Hotels_Lodges__c}"/>
<apex:inputField value="{!alsat.Booking_Period__c}"/>
<apex:inputField value="{!alsat.Members__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

controller:
public class hb1 {
alloted_satsangi__C alsat;

public void setalsat(alloted_satsangi__C al){
alsat = new alloted_satsangi__C();
alsat.name = al.name;
alsat.Date_and_Time_of_allotment__c=al.Date_and_Time_of_allotment__c;
alsat.Hotels_Lodges__c=al.Hotels_Lodges__c;
alsat.Booking_Period__c=al.Booking_Period__c;
alsat.Members__c=al.Members__c;
}

public alloted_satsangi__C getalsat(){
return alsat;
}

public void save(){
insert alsat;}

}
Challenge Not yet complete... here's what's wrong: 
The Apex test class 'AnimalLocatorTest' does not appear to be using the AnimalLocatorMock class correctly.