Exemple #1
0
        public static RosPackageInfo CreatePackageInfo(bool isValidPackage, params string[] packagePath)
        {
            var packageFolder = CreatePackagePath(isValidPackage, packagePath);
            var package       = RosPackageInfo.Create(packageFolder);

            return(package);
        }
        public void HasMessages_returns_true_if_package_contains_action_file()
        {
            var packageFolder = TestUtils.CreatePackagePath("test_action_msgs");
            var package       = RosPackageInfo.Create(packageFolder);

            package.HasMessages.Should().BeTrue();
            package.Messages.Should().NotBeNull();
            package.Messages.Should().NotBeEmpty();
            package.Messages.Should().OnlyContain(f => f.GetRosMessageType() == RosMessageType.Action);
        }
        void MessageFiles_returns_list_of_message_files()
        {
            var packageFolder = TestUtils.CreatePackagePath("std_msgs");
            var package       = RosPackageInfo.Create(packageFolder);

            package.Should().NotBeNull();

            package.Messages.Should().NotBeNull();
            package.Messages.Count().Should().BeGreaterThan(0);
            package.Messages.Should().OnlyContain(f => f.GetRosMessageType() != RosMessageType.None);
        }