IOS-2748 - adds test to reproduce LAS-32

IOS-2913
Andreas Buff 2 years ago
parent 8145cd6220
commit c51a99d185

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B7E0502C1EB2491E006EC1EC"
BuildableName = "libAccountSettingsAdapter.a"
BlueprintName = "AccountSettingsAdapter"
ReferencedContainer = "container:AccountSettingsAdapter.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B72A64D71EC0525500F71131"
BuildableName = "AccountSettingsAdapterTests.xctest"
BlueprintName = "AccountSettingsAdapterTests"
ReferencedContainer = "container:AccountSettingsAdapter.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B7E0502C1EB2491E006EC1EC"
BuildableName = "libAccountSettingsAdapter.a"
BlueprintName = "AccountSettingsAdapter"
ReferencedContainer = "container:AccountSettingsAdapter.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

@ -15,6 +15,23 @@
@implementation AccountSettingsAdapterTests
// LAS-32
- (void)testPosteoServerNotNil
{
id<AccountSettingsProtocol> as = [[AccountSettings alloc]
initWithAccountName:@" someone@posteo.net"
provider:nil flags:AS_FLAG_USE_ANY
credentials:nil];
[as lookup];
XCTAssertEqual(as.status, AS_OK);
XCTAssertNotNil(as.incoming.hostname);
XCTAssertNotNil(as.outgoing.hostname);
}
// MARK: - All the below: testing on concrete values does not make sense. The values can and will c hange. That is not an issue (but actually expected) if the new values are valid.
- (void)testQueryPeptest
{
NSString *hostName = @"peptest.ch";
@ -43,19 +60,6 @@
providerID: @"ovh.net"];
}
- (void)testQueryYahoo
{
[self testServerWithAddress:@"blahblah@yahoo.com" incomingHostName:@"imap.mail.yahoo.com"
incomingPort:993 incomingProtocol:AccountSettingsServerTypeIMAP
incomingTransport:AccountSettingsServerTransportTLS
incomingAuthMethod:AccountSettingsServerAuthMethodPasswordClearText
outgoingHostName:@"smtp.mail.yahoo.com" outgoingPort:465
outgoingProtocol:AccountSettingsServerTypeSMTP
outgoingTransport:AccountSettingsServerTransportTLS
outgoingAuthMethod:AccountSettingsServerAuthMethodPasswordClearText
providerID: AccountSettingsProviderIDYahoo];
}
- (void)testQueryGmail
{
[self testServerWithAddress:@"blahblah@gmail.com" incomingHostName:@"imap.gmail.com"
@ -86,7 +90,8 @@
{
id<AccountSettingsProtocol> as = [[AccountSettings alloc]
initWithAccountName:@"someone@example.com"
provider:nil flags:AS_FLAG_USE_ANY
provider:nil
flags:AS_FLAG_USE_ANY
credentials:nil];
[as lookup];

Loading…
Cancel
Save