Exemplo n.º 1
0
        public void SaveNewDeviceInDeviceList_WithNotExistingDevideId_ReturnsReadWriteException()
        {
            ReadWriteException ex = Assert.Catch <ReadWriteException>(() => DeviceListHandler.SaveNewDeviceInDeviceList(devices, dev2));

            StringAssert.Contains("Die Id " + dev2.Id + " existiert bereits in der Konfiguration, die ID muss eindeutig sein!", ex.Message);
        }
Exemplo n.º 2
0
        public void DeleteDeviceInDeviceList_WithNotExistingDevideId_ReturnsReadWriteException()
        {
            ReadWriteException ex = Assert.Catch <ReadWriteException>(() => DeviceListHandler.DeleteDeviceInDeviceList(devices, "dev3"));

            StringAssert.Contains("Löschen nicht erfolgreich, der Device mit Id dev3 ist nicht in der Konfiguration!", ex.Message);
        }
Exemplo n.º 3
0
        public void GetDeviceFromConfig_WithNotExistingDevideId_ReturnsReadWriteException()
        {
            ReadWriteException ex = Assert.Catch <ReadWriteException>(() => DeviceListHandler.GetDeviceFromDeviceList(devices, "dev3"));

            StringAssert.Contains("Device dev3 wurde in der Konfiguration nicht gefunden!", ex.Message);
        }