Exemplo n.º 1
0
        public void Reorder_packages_for_building_throws_exception_if_circular_dependencies_detected()
        {
            var context = CodeGenerationContext.Create(TestUtils.CreatePackagePath(false, "circular_msgs"));
            var orderer = new BuildOrderer(context);

            orderer.Invoking(x => x.Sort())
            .Should().Throw <CircularPackageDependencyException>();
        }
Exemplo n.º 2
0
        public void Can_reorder_packages_for_building_if_only_one_package_should_be_built()
        {
            var context = CodeGenerationContext.Create(TestUtils.CreatePackagePath("std_msgs"));
            var orderer = new BuildOrderer(context);

            orderer.Sort();
            orderer.Packages.Count().Should().Be(1);
        }
Exemplo n.º 3
0
        public void Can_reorder_packages_for_building_dependent_packages()
        {
            var context = CodeGenerationContext.Create(TestUtils.CreatePackagePath("common_msgs"));
            var orderer = new BuildOrderer(context);

            orderer.Sort();
            orderer.Packages.Count().Should().Be(10);
            orderer.Packages.Last().PackageInfo.Name.Should().Be("common_msgs", "the meta package should be built as last package");
        }