Ejemplo n.º 1
0
    def test_getDataObject_givenData_expectGivenInputData(
            self):
        data = [1, 2, 3, 4]
        dataCollection = DataCollection()
        dataCollection.setDataObject(data, "test")

        self.assertEqual(dataCollection.getDataObject("test"), data)
Ejemplo n.º 2
0
 def test_setDataObject_givenEmptyName_expectException(
         self):
     data = [1, 2, 3, 4]
     dataCollection = DataCollection()
     self.assertRaises(
         RuntimeError, lambda: dataCollection.setDataObject(data,""))