function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Help me on this Test Class..

VF Page:

<apex:page controller="AccountController1" id="pg" >
            <apex:form id="form">
            <apex:pageBlock title="Recent Accounts" id="pbs">
                  Name:  <apex:inputField value="{!}"  id="name"/> 
                  phone:  <apex:inputField value="{!}" id="phone" />
                   <apex:commandButton value="save" action="{!save}"/>           
                  <apex:pageBlock >
                  Name:<apex:outputField value="{!}" id="o1"/>
                  phone:<apex:outputField value="{!}" id="o2"/>
                  document.getElementById(pg:form:pbs:01:o2).value= document.getElementById(pg:form:pbs:name:phone).value;


public without sharing class AccountController1 {
    public Account account{get; set;}
    public AccountController1(){
        account = new Account();
    public void save(){
        upsert account;

PLease help me on this...
Best Answer chosen by Chinnoy
Apoorv Saxena 4Apoorv Saxena 4
Hi Venkat,

Here is your test class code :
public class AccountController1Test{
    static testMethod void testMe(){
        AccountController1 ac = new AccountController1();'Test Acc';;

Please mark this question as solved if this answers your question so that others can view it as proper solution.