Merge "CtsNetTests: Add a test for b/25624963"
This commit is contained in:
@@ -532,4 +532,15 @@ public class WifiEnterpriseConfigTest extends AndroidTestCase {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testEnterpriseConfigDoesNotPrintPassword() {
|
||||||
|
WifiEnterpriseConfig enterpriseConfig = new WifiEnterpriseConfig();
|
||||||
|
final String identity = "IdentityIsOkayToBeDisplayedHere";
|
||||||
|
final String password = "PasswordIsNotOkayToBeDisplayedHere";
|
||||||
|
enterpriseConfig.setIdentity(identity);
|
||||||
|
enterpriseConfig.setPassword(password);
|
||||||
|
final String stringRepresentation = enterpriseConfig.toString();
|
||||||
|
assertTrue(stringRepresentation.contains(identity));
|
||||||
|
assertFalse(stringRepresentation.contains(password));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user