nimatohid
BAN USER1. Ask the interviewer some clarifying questions:
A. Is the SIM card that is in device assumed to be able to send SMS? If we don't know can we test the SIM with another device we are confident has SMS working?
B. Do we have an SMS receiver of some kind (Another mobile device, multiple other mobile devices, computer back-end) that can receive and display to us your SMS.
C. Do we also want to test MMS?
2. Functional test cases: Phone is connected to network and SMS should go through: regular text, funny characters in text (check how they are displayed on the receiving end)
Border cases: Large texts (does the phone split it up to multiple texts? What's the expected behavior? Empty text. Text to multiple people (possibly performance test as well, how long does it take for the device to send a large number of SMS's? Stress test this)
Non-functional: Network off, send text, how does device behave? Turn network on, does device send it off once network back on? Send text to device while network is off. Does device receive once network is back on?
Run all test cases for both receiving and sending SMS...
@Rahul nice idea. I actually solved the problem this way in java, it assumes no duplicate values in the array.
public static boolean addsUp(int [] array, int sum){
if(array==null)
return false;
Set<Integer> targetSet = new HashSet<Integer>();
Set<Integer> arraySet= new HashSet<Integer>();
for(int i=0; i<array.length; i++){
targetSet.add(sum - array[i]);
arraySet.add(array[i]);
}
arraySet.retainAll(targetSet);
return arraySet.size()>1;
}
- nimatohid April 17, 2013