from material.orthotropic import Orthotropic

kwargs = {"matID": "zg", "E1": 181.0, "E2": 10.3, "G12": 7.17, "G13": 7.17,
"G23": 7.17, "v12": 0.28}

class TestOrthotropicClass():
    """Unittesting Orthotropic class"""

    materials = {}

    def setup_class(cls):
        """Set up the class using the kwargs declared at the top."""

        matID = kwargs.get("matID")
        E1 = kwargs.get("E1")
        E2 = kwargs.get("E2")
        G12 = kwargs.get("G12")
        G13 = kwargs.get("G13")
        G23 = kwargs.get("G23")
        v12 = kwargs.get("v12")
        cls.materials[matID] = Orthotropic(matID=matID, E1=E1, E2=E2, G12=G12,
        G13=G13, G23=G23, v12=v12)

    def test_material_instance(self):
        """Unittest instance of the class."""

        assert "zg" in self.materials

    def test_material_v21(self):
        """Unittest v21 calculation."""
        
        assert self.materials["zg"].v21 == kwargs.get("v12")*kwargs.get("E2")/kwargs.get("E1")
