Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Conversation

@faridjafri
Copy link

As I have mentioned in feedback.txt, I think expected values for getCustomersRetainedForYearsByPlcyCostAsc2 are wrong in the test file.

@stuin
Copy link

stuin commented Oct 11, 2020

From what I saw, getCustomersRetainedForYearsByPlcyCostAsc2 is just a missnamed test for getDependents

@faridjafri
Copy link
Author

From what I saw, getCustomersRetainedForYearsByPlcyCostAsc2 is just a missnamed test for getDependents

Right, but the expected values are still incorrect in the tests. I check the csv manually by filtering by parameters as described in the documentation. Did you get it right?

@GaganBhat
Copy link

GaganBhat commented Oct 11, 2020

@faridjafri Yes, I was able to get it correctly. I had a similar issue it might be related to the way you parse your dependents possibly.

This was my solution.

List<Customer> custList = readCsvFile(filePath, Customer.class);
List<Customer> customCust = new ArrayList<>();

custList.forEach(current -> {
	if (current.getAge() >= 40 && current.getAge() <= 50)
		if (current.getVehiclesInsured() > vehiclesInsured && current.getDependents().size() <= dependents)
			customCust.add(current);
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants