def test_initFeature():
    f = entities.Feature()
    assert isinstance(f, entities.Feature)
    assert isinstance(f.userStories, List)
    assert len(f.userStories) == 0
    assert isinstance(f.tags, List)
    assert len(f.tags) == 0
def test_addTagsToTagList():
    f = entities.Feature()
    for r in range(5):
        t = entities.Tag()
        f.addTag(t)

    assert len(f.tags) == 5
    assert isinstance(f.tags, List)
    assert isinstance(f.tags[0], entities.Tag)
def test_addFeaturesToFeatureList():
    e = entities.Epic()
    for r in range(5):
        f = entities.Feature()
        e.addFeature(f)

    assert len(e.features) == 5
    assert isinstance(e.features, List)
    assert isinstance(e.features[0], entities.Feature)
def test_addStoriesToUserStoryList():
    f = entities.Feature()
    for r in range(5):
        s = entities.UserStory()
        f.addUserStory(s)

    assert len(f.userStories) == 5
    assert isinstance(f.userStories, List)
    assert isinstance(f.userStories[0], entities.UserStory)
def test_addGenericsToTagList():
    f = entities.Feature()
    with pytest.raises(TypeError) as exc:
        for r in range(5):
            f.addTag(r)
    assert "value must be of type 'Tag'" in str(exc.value)
def test_setDescriptionToNumber():
    f = entities.Feature()

    with pytest.raises(TypeError) as exc:
        f.description = 42
    assert "value must be a string" in str(exc.value)
def test_setDescriptionToString():
    f = entities.Feature()
    f.description = "Test"
    assert f.description == "Test"
def test_setTitleToNumber():
    f = entities.Feature()

    with pytest.raises(TypeError) as exc:
        f.title = 42
    assert "value must be a string" in str(exc.value)
def test_setTitleToString():
    f = entities.Feature()
    f.title = "Test"
    assert f.title == "Test"
    def mock_backlog_build_feature_returns_feature(*args, **kwargs):
        feature = entities.Feature()
        feature.title = "Some Feature"
        feature.description = "Some Description"

        return feature
Пример #11
0
    def mockBacklogBuildFeatureReturnFeature(*args, **kwargs):
        feature = entities.Feature()
        feature.title = "Some Feature"
        feature.description = "Some Description"

        return feature
Пример #12
0
def test_add_generics_to_userstory_list():
    f = entities.Feature()
    with pytest.raises(TypeError) as exc:
        for r in range(5):
            f.add_userstory(r)
    assert "value must be of type 'UserStory'" in str(exc.value)
Пример #13
0
def test_set_description_to_string():
    f = entities.Feature()
    f.description = "Test"
    assert f.description == "Test"
Пример #14
0
def test_set_title_to_string():
    f = entities.Feature()
    f.title = "Test"
    assert f.title == "Test"