You need to sign in to do that
Don't have an account?

while Writing Test class error, System.NullPointerException: Attempt to de-reference a null object. Can any one help me out what kind of error it is?
@isTest(SeeAllData=true)
public class TestupdateFallout
{
static testMethod void updateFallout()
{
Messaging.InboundEmail email = new Messaging.InboundEmail() ;
Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();
// setup the data for the email
email.fromAddress = 'rajat@salesforce.com';
env.toAddress=('test_email_service@v-owqjewyhqhs8stb49ok48inl50drvv20gd0siiwzsbiu38uix.11-4ypueay.cs18.apex.salesforce.com');
email.htmlBody='<?xml version="1.0" encoding="UTF-8"?><ValidateConfigResult><Configuration><ConfigId>CE05502807</ConfigId><Status>false</Status></Configuration></ValidateConfigResult>';
test.startTest();
updateFallout testInbound=new updateFallout();
testInbound.handleInboundEmail(email,env);
test.stopTest();
}
}
public class TestupdateFallout
{
static testMethod void updateFallout()
{
Messaging.InboundEmail email = new Messaging.InboundEmail() ;
Messaging.InboundEnvelope env = new Messaging.InboundEnvelope();
// setup the data for the email
email.fromAddress = 'rajat@salesforce.com';
env.toAddress=('test_email_service@v-owqjewyhqhs8stb49ok48inl50drvv20gd0siiwzsbiu38uix.11-4ypueay.cs18.apex.salesforce.com');
email.htmlBody='<?xml version="1.0" encoding="UTF-8"?><ValidateConfigResult><Configuration><ConfigId>CE05502807</ConfigId><Status>false</Status></Configuration></ValidateConfigResult>';
test.startTest();
updateFallout testInbound=new updateFallout();
testInbound.handleInboundEmail(email,env);
test.stopTest();
}
}
testInbound.handleInboundEmail(email,envelope);