# Path: SmellDetector/ModSmellDectector.py
# def detectSmells(folder, outputFile):
# def detectInsufficientMod(folder, outputFile):
# def detectUnstructuredMod(folder, outputFile):
# def detectTightlyCoupledMod(folder, outputFile):
# def detectHairballStrAndWeakendMod(folder, outputFile):
# def detectInsufficientModForm1(folder, outputFile):
# def detectInsModForm1(fileObj, outputFile):
# def detectInsufficientModForm2(folder, outputFile):
# def detectInsModForm2(fileObj, outputFile):
# def detectInsufficientModForm3(folder, outputFile):
# def detectInsModForm3(fileobj, outputFile):
# def detectUnstructuredModForm1(folder, outputFile):
# def isModulesExists(folder):
# def getModulesFolder(folder):
# def getManifestsFolder(folder):
# def detectUnstructuredModForm2(folder, outputFile):
# def detectUnsModForm2(folder, outputFile):
# def detectUnstructuredModForm3(folder, outputFile):
# def detectUnsModForm3(folder, outputFile):
# def detectTCMod(fileObj, outputFile):
# def getGraph(folder):
# def addGraphNodes(folder, graph):
# def addGraphNodesFromModules(folder, graph):
# def addGraphResources(node, aModule):
# def addResources(fileObj, node):
# def addGraphNodesFromRestPuppetFiles(folder, graph):
# def addGraphEdges(folder, graph):
# def addGraphEdgesFromModules(folder, graph):
# def addGraphEdgesByNode(node, graph, aModule):
# def addEdges(fileObj, node, graph):
# def searchDependentNode(graph, node, name, type):
# def addGraphEdgesFromRestPuppetFiles(folder, graph):
# def detectHaiStr(graph, folder, outputFile):
# def detectWeakendMod(graph, folder, outputFile):


from unittest import TestCase
from SmellDetector import ModSmellDectector
import SourceModel.SM_File



class TestModSmells(TestCase):
    def test_detectInsModForm1(self):
        self.insModForm1PositiveCase()
        self.insModForm1NegativeCase()

    def insModForm1PositiveCase(self):
        fileName = "/Users/Tushar/Documents/Research/PuppetQuality/Repos/operations-puppet-production/manifests/role/authdns.pp"
        outFileName = "tmp/insufficientModForm1Test.txt"
        fileObj = SourceModel.SM_File.SM_File(fileName)
        outFile = open(outFileName, 'w')

# Path: SmellDetector/ModSmellDectector.py
# def detectSmells(folder, outputFile):
# def detectInsufficientMod(folder, outputFile):
# def detectUnstructuredMod(folder, outputFile):
# def detectTightlyCoupledMod(folder, outputFile):
# def detectHairballStrAndWeakendMod(folder, outputFile):
# def detectInsufficientModForm1(folder, outputFile):
# def detectInsModForm1(fileObj, outputFile):
# def detectInsufficientModForm2(folder, outputFile):
# def detectInsModForm2(fileObj, outputFile):
# def detectInsufficientModForm3(folder, outputFile):
# def detectInsModForm3(fileobj, outputFile):
# def detectUnstructuredModForm1(folder, outputFile):
# def isModulesExists(folder):
# def getModulesFolder(folder):
# def getManifestsFolder(folder):
# def detectUnstructuredModForm2(folder, outputFile):
# def detectUnsModForm2(folder, outputFile):
# def detectUnstructuredModForm3(folder, outputFile):
# def detectUnsModForm3(folder, outputFile):
# def detectTCMod(fileObj, outputFile):
# def getGraph(folder):
# def addGraphNodes(folder, graph):
# def addGraphNodesFromModules(folder, graph):
# def addGraphResources(node, aModule):
# def addResources(fileObj, node):
# def addGraphNodesFromRestPuppetFiles(folder, graph):
# def addGraphEdges(folder, graph):
# def addGraphEdgesFromModules(folder, graph):
# def addGraphEdgesByNode(node, graph, aModule):
# def addEdges(fileObj, node, graph):
# def searchDependentNode(graph, node, name, type):
# def addGraphEdgesFromRestPuppetFiles(folder, graph):
# def detectHaiStr(graph, folder, outputFile):
# def detectWeakendMod(graph, folder, outputFile):


# Path: Tests/test_ModSmells.py
from unittest import TestCase
from SmellDetector import ModSmellDectector
import SourceModel.SM_File




class TestModSmells(TestCase):
    def test_detectInsModForm1(self):
        self.insModForm1PositiveCase()
        self.insModForm1NegativeCase()

    def insModForm1PositiveCase(self):
        fileName = "/Users/Tushar/Documents/Research/PuppetQuality/Repos/operations-puppet-production/manifests/role/authdns.pp"
        outFileName = "tmp/insufficientModForm1Test.txt"
        fileObj = SourceModel.SM_File.SM_File(fileName)
        outFile = open(outFileName, 'w')

        ModSmellDectector.detectInsModForm1(fileObj, outFile)