• WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Field Service Solutions
      • Field Service for Enterprises
      • Field Service for SMBs
    • AI/ML Solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
    • Events
      • Employee Empowerment Series
      • Employee Engagement Series
      • Knowledge Sharing Sessions
  • REACH US
    • Contact Us
    • Careers
  • BLOG
    • WHO WE ARE
    • WHAT WE DO
      • Salesforce
        • Implementations
          • Sales Cloud
          • Service Cloud
          • CPQ
        • Developments
          • Salesforce Customization
          • Custom Application Development
          • AppExchange Product Development
        • Migrations
          • Classic to Lightning Migration
          • Other Systems to Salesforce Migration
        • Integrations
      • Field Service Solutions
        • Field Service for Enterprises
        • Field Service for SMBs
      • AI/ML Solutions
        • Agentic AI
    • HOW WE DO
      • Delivery Model
      • Our Works
      • Events
        • Employee Empowerment Series
        • Employee Engagement Series
        • Knowledge Sharing Sessions
    • REACH US
      • Contact Us
      • Careers
    • BLOG
  • [email protected]
  • (+91) 44-49521562
Merfantz - Salesforce Solutions for SMEs
Merfantz - Salesforce Solutions for SMEs
  • WHO WE ARE
  • WHAT WE DO
    • Salesforce
      • Implementations
        • Sales Cloud
        • Service Cloud
        • CPQ
      • Developments
        • Salesforce Customization
        • Custom Application Development
        • AppExchange Product Development
      • Migrations
        • Classic to Lightning Migration
        • Other Systems to Salesforce Migration
      • Integrations
    • Field Service Solutions
      • Field Service for Enterprises
      • Field Service for SMBs
    • AI/ML Solutions
      • Agentic AI
  • HOW WE DO
    • Delivery Model
    • Our Works
    • Events
      • Employee Empowerment Series
      • Employee Engagement Series
      • Knowledge Sharing Sessions
  • REACH US
    • Contact Us
    • Careers
  • BLOG

How to Cover the Wrapper Class Test Method in Salesforce

  • July 28, 2017
  • Merfantz Editor
  • Salesforce Developments Tutorial
  • 6

To Cover the Wrapper Class test method in FieldAx,

Code –

public with sharing class sno_in_table{

public list<wrap> getRecords()    {
integer sno=1;
list<wrap>emps=new list<wrap>();
list<employee__c>emp_records=[select name,phone__c from employee__c];

            for(employee__c em:emp_records){

emps.add(new wrap(sno,em));
sno++;

             }
return emps;
}

//wrapper class

public class wrap{
public integer sno{get;set;}
public employee__c emp{get;set;}

public wrap(integer sn, employee__c e){
emp=e;
sno=sn;
}

}

public static testmethod void m1(){
sno_in_table sno=new sno_in_table();
sno.getrecords();
}

}

Solution: –

Integer int=56;

employee__c emp = new employee__c();

// if possible insert fields in this

sno_in_table.wrap cmp = new sno_in_table.wrap(int,emp);

We are the ISV Partners and Please reach us for custom development => www.merfantz.com

Author Bio

Merfantz Editor
+ Recent Posts
  • August 4, 2023
    How to Setup CRM Analytics for Financial Services Cloud
  • August 2, 2023
    How to Get Started with Salesforce Hyperforce - Merfantz
  • July 28, 2023
    Health Cloud Mastery: Salesforce Trailhead for Effective Healthcare CRM
  • July 26, 2023
    How to integrate Data cloud and Marketing cloud In Salesforce
Tags: Field Service ManagementFieldax
  • Previous Multiple Technician Calendar in FieldAx
  • Next How to Cover the Constructor Test Class in Salesforce

6 comments on “How to Cover the Wrapper Class Test Method in Salesforce”

  1. artemia says:
    April 21, 2026 at

    Стильный лук формирует уверенное первое впечатление.
    Собственная одежда ведёт разговор ещё раньше первого приветствия.
    Продуманный гардероб заметно поднимает уверенность и настроение.
    Такой выбор выражает внимание как к себе, так и к окружающим.
    Посредством лук вы в состоянии выразить личность и предпочтения молчаливо.
    Люди часто воспринимают стильно одетых людей более компетентными и организованными.
    Поэтому, инвестиции в свой имидж — это выгодная ставка в будущее.
    https://www.registrofiatbarchetta.com/viewtopic.php?f=17&t=238519&p=1854001

  2. меф кристал says:
    May 3, 2026 at

    На данном ресурсе размещена практичная информация.
    Посетитель в состоянии обнаружить тут много полезного для себя.
    Материалы отличаются достоверностью и актуальностью, что важно для принятия решений.
    Рекомендуем регулярно посещать данный сайт, чтобы оставаться в теме.
    меф

  3. лесби видео says:
    May 5, 2026 at

    Здесь, на этом портале имеется полезная информация.
    Любой желающий можете почерпнуть здесь много интересного для своих нужд.
    Материалы характеризуются достоверностью и своевременностью, а это важно для правильного выбора.
    Рекомендуем регулярно посещать данный сайт, чтобы оставаться в теме.
    девушка со страпоном

  4. Tez888 says:
    May 8, 2026 at

    Responsible gaming means maintaining control over your time and budget.
    It involves setting limits before you start playing.
    A player should under no circumstances chase lost money.
    Tez888
    Safe gambling also requires recognizing that results are determined by chance, not skill.
    This promotes taking frequent pauses and steering clear of gambling when stressed or under the influence.
    Known tools like deposit limits and time-outs help players stay in healthy condition.
    At its core, responsible gambling is focused on enjoying the activity as entertainment, not as a way to earn income.

  5. BrandonSpulp says:
    May 13, 2026 at

    Грамотный выбор корпоративной мебели напрямую влияет на здоровье и продуктивность персонала.
    Важнейший фактор — это удобство cтульев и столов.
    Качественная мебель способна уменьшать нагрузку и профилактировать проблемы опорно-двигательного аппарата.
    Точно так же значим внешний облик изделий, ведь он формирует имидж фирмы для клиентов и посетителей.
    https://careerblog.miramoda.ru/redirect.php?id=El4UPemg9
    Стоит обращать внимание на материалы: натуральное дерево, качественный стальной каркас и экологичные покрытия.
    Функциональность предметов мебели выражается в организации ящиков и настроек под индивидуальные задачи.
    Ценовой диапазон также играет роль, но скупость на этих изделиях способна привести к дополнительным издержкам на ремонт или больничные.
    Поэтому, предпочитайте надёжных вендоров с официальными обязательствами и документацией соответствия.

  6. mã nhận thưởng 888slot says:
    May 18, 2026 at

    Nhóm 5: Tổng hợp & Kêu gọi hành động (CTA) (20 đoạn) TONY05-15

Leave a Reply

Your email address will not be published. Required fields are marked *

Merfantz Technologies is a leading Salesforce consulting firm dedicated to helping small and medium enterprises transform their operations and achieve their goals through the use of the Salesforce platform. Contact us today to learn more about our services and how we can help your business thrive.

Discover More

Terms and Conditions
Privacy Policy
Cancellation & Refund Policy
Information Security Policy

Contact Info

  • No 96, 2nd Floor, Greeta Tech Park, VSI Industrial Estate, Perungudi, Chennai 600 096, Tamil Nadu, INDIA
  • (+91) 44-49521562
  • [email protected]
  • 9:30 IST - 18:30 IST

Latest Posts

The Breaking Point of a Poorly Managed Salesforce Org May 19, 2026
The Cost of Running Salesforce Without Ownership or Governance May 12, 2026
Why Fixing Salesforce Requires More Than Technical Changes May 5, 2026

Copyright @2023 Merfantz Technologies, All rights reserved