Пример #1
0
    def test_create_sets_type_to_tree_name_without_spaces(self):
        tree = TreeBuilder().name("Tradeskill Prestige").build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.type, "TradeskillPrestige")
Пример #2
0
    def test_create_name_equal_to_archetype_sets_type(self):
        tree = TreeBuilder().name(self._lineage["archetype"]).build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.type, "Archetype")
Пример #3
0
    def test_create_is_warder_tree_sets_warder_type(self):
        tree = TreeBuilder().is_warder_tree().build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.type, "Warder")
Пример #4
0
    def test_create_has_prismatic_subtree_name_adds_prismatic_suffix(self):
        self._subtrees = ["Prismatic"]
        tree = TreeBuilder().name(self._class_name).build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.name, self._class_name + " (Prismatic)")
        self.assertEqual(result.type, "ClassPrismatic")
Пример #5
0
    def test_create_populates_max_points(self):
        tree = TreeBuilder()\
            .max_points(150)\
            .build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.max_points, 150)
Пример #6
0
    def test_create_populates_aa(self):
        aa_node = AABuilder().with_id(1).name("SomeAA").build()
        tree = TreeBuilder()\
            .with_aa([aa_node])\
            .build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.aa, self._aa)
Пример #7
0
    def test_create_populates_x_y_ratio_and_subclasses(self):
        tree = TreeBuilder()\
            .x_subclass("XSubclass")\
            .y_subclass("YSubclass")\
            .x_y_ratio(20, 2)\
            .build()

        self._setup_tree(tree)
        result = self.sut.create(0, self._lineage, self._class_name)

        self.assertEqual(result.x_y_ratio, 10)
        self.assertEqual(result.x_subclass, "XSubclass")
        self.assertEqual(result.y_subclass, "YSubclass")
Пример #8
0
    def test_create_maps_basic_properties(self):
        tree_soe_id = 1
        tree = TreeBuilder()\
            .with_id(tree_soe_id)\
            .is_warder_tree()\
            .build()

        self._setup_tree(tree)

        result = self.sut.create(tree_soe_id, self._lineage, self._class_name)

        self.assertEqual(result.id, 1)
        self.assertEqual(result.soe_id, tree_soe_id)
        self.assertEqual(result.name, tree["name"])
        self.assertEqual(result.is_warder_tree, True)