#5657 Use SerialKey class in ServerArgs

This commit is contained in:
Andrew Nelless
2016-10-17 17:38:05 +01:00
parent 88c59b4ca6
commit 99dbdc5eb3
5 changed files with 37 additions and 57 deletions

View File

@@ -1,11 +1,11 @@
/*
* synergy -- mouse and keyboard sharing utility
* Copyright (C) 2014-2016 Symless Ltd.
*
*
* This package is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* found in the file LICENSE that should have accompanied this file.
*
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -64,17 +64,3 @@ TEST(ServerArgsParsingTests, parseServerArgs_configArg_setConfigFile)
EXPECT_EQ("mock_configFile", serverArgs.m_configFile);
}
TEST(ServerArgsParsingTests, parseServerArgs_serialArg_setSerial)
{
NiceMock<MockArgParser> argParser;
ON_CALL(argParser, parseGenericArgs(_, _, _)).WillByDefault(Invoke(server_stubParseGenericArgs));
ON_CALL(argParser, checkUnexpectedArgs()).WillByDefault(Invoke(server_stubCheckUnexpectedArgs));
ServerArgs serverArgs;
const int argc = 3;
const char* kSerialCmd[argc] = { "stub", "--serial-key", "mock_serial" };
argParser.parseServerArgs(serverArgs, argc, kSerialCmd);
EXPECT_EQ("mock_serial", serverArgs.m_serial);
}