Fix ChsgenCommandlineTest.noFile after chsgen changed 11/39311/2
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Tue, 12 May 2015 17:48:38 +0000 (19:48 +0200)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Wed, 13 May 2015 13:07:45 +0000 (15:07 +0200)
Patch 7d35fb4 fixed build of chsgen by removing dependency on
Cynara Exceptions. Instead of Cynara Exceptions generic exceptions
are thrown and generic error code is returned in case of failure.

This patch fixes chsgen test that expected more detailed error code
and slightly different error message.

Change-Id: Ic0a2090fb28d773ce4af3264eb600168cef1a69c

test/chsgen/checksumgenerator.cpp

index fa307ad..5fcd03a 100644 (file)
@@ -41,7 +41,7 @@ const char fieldSeparator(Cynara::PathConfig::StoragePath::fieldSeparator);
 /**
  * @brief   Verify if passing no filenames to checksum generator returns error message
  * @test    Expected result:
- * - CYNARA_API_INVALID_COMMANDLINE_PARAM returned from checksum generator
+ * - CYNARA_API_UNKNOWN_ERROR returned from checksum generator
  * - empty output stream
  * - message from caught exception in error stream
  */
@@ -58,9 +58,9 @@ TEST_F(ChsgenCommandlineTest, noFile) {
     const auto ret = chsgen.run();
     getOutput(out, err);
 
-    ASSERT_EQ(CYNARA_API_INVALID_COMMANDLINE_PARAM, ret);
+    ASSERT_EQ(CYNARA_API_UNKNOWN_ERROR, ret);
     ASSERT_TRUE(out.empty());
-    ASSERT_THAT(err, StartsWith("File " + std::string() + " not found or corrupted badly"));
+    ASSERT_THAT(err, StartsWith("File not found: " + std::string()));
 }
 
 /**