~ci-train-bot/ubuntu-app-launch/ubuntu-app-launch-ubuntu-zesty-2264

« back to all changes in this revision

Viewing changes to tests/libual-cpp-test.cc

  • Committer: Bileto Bot
  • Date: 2017-04-04 21:47:47 UTC
  • mfrom: (294.4.8 persistentid)
  • Revision ID: ci-train-bot@canonical.com-20170404214747-sobzev96qayf2qro
Bump version for new AppID methods

Show diffs side-by-side

added added

removed removed

Lines of Context:
579
579
    return;
580
580
}
581
581
 
 
582
TEST_F(LibUAL, DBusID)
 
583
{
 
584
    auto id = ubuntu::app_launch::AppID::parse("container-name_test_0.0");
 
585
    ASSERT_FALSE(id.empty());
 
586
    EXPECT_EQ("container_2dname_5ftest_5f0_2e0", id.dbusID());
 
587
    EXPECT_FALSE(ubuntu::app_launch::AppID::valid(id.dbusID()));
 
588
 
 
589
    auto parsed = ubuntu::app_launch::AppID::parseDBusID(id.dbusID());
 
590
    ASSERT_FALSE(parsed.empty());
 
591
    EXPECT_EQ(id, parsed);
 
592
}
 
593
 
 
594
TEST_F(LibUAL, PersistentID)
 
595
{
 
596
    auto id = ubuntu::app_launch::AppID::parse("container-name_test_0.0");
 
597
    ASSERT_FALSE(id.empty());
 
598
    EXPECT_EQ("container-name_test", id.persistentID());
 
599
    EXPECT_FALSE(ubuntu::app_launch::AppID::valid(id.persistentID()));
 
600
 
 
601
    auto found = ubuntu::app_launch::AppID::find(registry, id.persistentID());
 
602
    ASSERT_FALSE(found.empty());
 
603
    EXPECT_EQ(id, found);
 
604
}
 
605
 
582
606
TEST_F(LibUAL, ApplicationList)
583
607
{
584
608
    SnapdMock snapd{LOCAL_SNAPD_TEST_SOCKET, {u8Package, interfaces, u8Package}};