Trying to get code coverage up and I am not understanding why this boolean value will not pass from the test method to the class. It always returns true.
Test Method:
@isTest static void test_searchmorePages() {
Test.startTest();
CustomerController controller = new CustomerController();
controller.standardSearch = false;
controller.searchAdditional();
controller.standardSearch = false;
controller.next();
controller.clear();
Test.stopTest();
}
Custom Controller:
public class CustomerController {
public boolean standardSearch{get;set;}
public void searchAdditional() {
standardSearch = false;
}
public void next(){
if (standardSearch = true) {
system.debug('its true');
}
else {
system.debug('its false');
}
}