doc/commands: remove ModelView dependency
[nit.git] / src / doc / commands / tests / test_commands_catalog.nit
index 07e82d8..5b4d4cd 100644 (file)
@@ -26,7 +26,7 @@ class TestCommandsCatalog
                var catalog = new Catalog(test_builder)
 
                # Compute the poset
-               for p in test_view.mpackages do
+               for p in test_model.mpackages do
                        var g = p.root
                        assert g != null
                        test_builder.scan_group(g)
@@ -41,7 +41,7 @@ class TestCommandsCatalog
                        end
                end
                # Build the catalog
-               for mpackage in test_view.mpackages do
+               for mpackage in test_model.mpackages do
                        catalog.package_page(mpackage)
                        catalog.git_info(mpackage)
                        catalog.mpackage_stats(mpackage)
@@ -50,14 +50,14 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog is test do
-               var cmd = new CmdCatalogPackages(test_view, test_catalog)
+               var cmd = new CmdCatalogPackages(test_model, test_catalog, test_filter)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog"
        end
 
        fun test_cmd_catalog_search is test do
-               var cmd = new CmdCatalogSearch(test_view, test_catalog, "testprog")
+               var cmd = new CmdCatalogSearch(test_model, test_catalog, test_filter, "testprog")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.results.as(not null).first.full_name == "test_prog"
@@ -65,21 +65,21 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_stats is test do
-               var cmd = new CmdCatalogStats(test_view, test_catalog)
+               var cmd = new CmdCatalogStats(test_model, test_catalog, test_filter)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.stats != null
        end
 
        fun test_cmd_catalog_tags is test do
-               var cmd = new CmdCatalogTags(test_view, test_catalog)
+               var cmd = new CmdCatalogTags(test_model, test_catalog, test_filter)
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.packages_count_by_tags.as(not null).length == 2
        end
 
        fun test_cmd_catalog_tag is test do
-               var cmd = new CmdCatalogTag(test_view, test_catalog, "test")
+               var cmd = new CmdCatalogTag(test_model, test_catalog, test_filter, "test")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.tag == "test"
@@ -87,14 +87,15 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_person is test do
-               var cmd = new CmdCatalogPerson(test_view, test_catalog, person_name = "Alexandre Terrasa")
+               var cmd = new CmdCatalogPerson(test_model, test_catalog, test_filter,
+                       person_name = "Alexandre Terrasa")
                var res = cmd.init_command
                assert res isa CmdSuccess
                assert cmd.person.as(not null).name == "Alexandre Terrasa"
        end
 
        fun test_cmd_catalog_contributing is test do
-               var cmd = new CmdCatalogContributing(test_view, test_catalog,
+               var cmd = new CmdCatalogContributing(test_model, test_catalog, test_filter,
                        person_name = "Alexandre Terrasa")
                var res = cmd.init_command
                assert res isa CmdSuccess
@@ -103,7 +104,7 @@ class TestCommandsCatalog
        end
 
        fun test_cmd_catalog_maintaining is test do
-               var cmd = new CmdCatalogMaintaining(test_view, test_catalog,
+               var cmd = new CmdCatalogMaintaining(test_model, test_catalog, test_filter,
                        person_name = "Alexandre Terrasa")
                var res = cmd.init_command
                assert res isa CmdSuccess