• Joshua Moody
  • NEWBIE
  • 35 Points
  • Member since 2014


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
Hello,
I cannot connect my Force.com IDE to my developer org.  Here is what I have done:
-verified username
-verified password
-reset token
-verified token in format "passwordtoken"
-verified both are on version 36 via eclipse and WSDL
-turned off all firewall/web protection

Thanks for your help!
I am running up against a bug when testing the code provided in Trailhead "Getting Started with Apex Unit Tests".  I was working on the "VerifyDate" test and could not achieve any coverage.  So I copied the example "TemperatureConverter" and "TemperatureConverterTest".  That test also showed 0% coverage.  Anyone having the same issue?

Example:
public class TemperatureConverter {
    // Takes a Fahrenheit temperature and returns the Celsius equivalent.
    public static Decimal FahrenheitToCelsius(Decimal fh) {
        Decimal cs = (fh - 32) * 5/9;
        return cs.setScale(2);
    }
}


Example Test:
@isTest
private class TemperatureConverterTest {

    @isTest static void testWarmTemp() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(70);
        System.assertEquals(21.11,celsius);
    }
    
    @isTest static void testFreezingPoint() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(32);
        System.assertEquals(0,celsius);
    }

    @isTest static void testBoilingPoint() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(212);        
        System.assertEquals(100,celsius,'Boiling point temperature is not expected.');
    } 
    
    @isTest static void testNegativeTemp() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(-10);
        System.assertEquals(-23.33,celsius);
    }
      
}
 
I am running up against a bug when testing the code provided in Trailhead "Getting Started with Apex Unit Tests".  I was working on the "VerifyDate" test and could not achieve any coverage.  So I copied the example "TemperatureConverter" and "TemperatureConverterTest".  That test also showed 0% coverage.  Anyone having the same issue?

Example:
public class TemperatureConverter {
    // Takes a Fahrenheit temperature and returns the Celsius equivalent.
    public static Decimal FahrenheitToCelsius(Decimal fh) {
        Decimal cs = (fh - 32) * 5/9;
        return cs.setScale(2);
    }
}


Example Test:
@isTest
private class TemperatureConverterTest {

    @isTest static void testWarmTemp() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(70);
        System.assertEquals(21.11,celsius);
    }
    
    @isTest static void testFreezingPoint() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(32);
        System.assertEquals(0,celsius);
    }

    @isTest static void testBoilingPoint() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(212);        
        System.assertEquals(100,celsius,'Boiling point temperature is not expected.');
    } 
    
    @isTest static void testNegativeTemp() {
        Decimal celsius = TemperatureConverter.FahrenheitToCelsius(-10);
        System.assertEquals(-23.33,celsius);
    }
      
}
 
When you have a Lookup Relationship with defined Filter Criteria, you cannot provide a Profile or User with the option to override or neglect this Relationship. If you are using active Integration or you want to perform an initial Data Load for which this Filter Criteria needs to be bypassed, your upload will fail for certain cases. Because the active user doesn't fulfill the criteria defined.

For a User record who performs the Data Migration or Integration, this might become a problem.

Could you please help on this matter as atleast system admin should be able to update the data by ignoring the criteria? Also, remember even if the validation rule is another option,the user will again see lots of unwanted data in lookup filter.