Beispiel #1
0
    def test_positive_04(self):
        "Requirement Tag Type - tag given 'requirement'"
        config, req = create_parameters()
        req["Type"] = RecordEntry("Type", "requirement")

        rt = ReqType(config)
        name, value = rt.rewrite("Type-test", req)
        assert(name == "Type")
        assert(value == Requirement.rt_requirement)
Beispiel #2
0
    def test_positive_03(self):
        "Requirement Tag Type - tag given 'design decision'"
        config, req = create_parameters()
        req["Type"] = RecordEntry("Type", "design decision")

        rt = ReqType(config)
        name, value = rt.rewrite("Type-test", req)
        assert(name == "Type")
        assert(value == Requirement.rt_design_decision)
Beispiel #3
0
    def test_negative_01(self):
        "Requirement Tag Type - no tag given"
        config, req = create_parameters()

        rt = ReqType(config)
        try:
            name, value = rt.rewrite("Type-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 18)
Beispiel #4
0
    def test_negative_02(self):
        "Requirement Tag Type - invalid tag given"
        config, req = create_parameters()
        req["Type"] = RecordEntry("Type", "dasjibtedjarnich")

        rt = ReqType(config)
        try:
            name, value = rt.rewrite("Type-test", req)
            assert(False)
        except RMTException, rmte:
            assert(rmte.id() == 19)