Esempio n. 1
0
 def __init__(self, name, age, avatar, password):
     self.name = name
     self.age = age
     self.avatar = avatar
     self.password = password
     self.subscriptions = []
     self.__life_time = 0
     self.dead = False
     self.__notifier = Decorator.ConcreteNotifier()
     self.notify_inside_network = False
     self.notify_email = False
     self.notify_telegram = False
     self.notify_whats_app = False
     self.notify_viber = False
Esempio n. 2
0
 def test_decorator(self):
     self.assertEqual(Decorator.decorator(3), 8)
     self.assertEqual(Decorator.decorator(8), 13)
     self.assertEqual(Decorator.decorator(3), 8)
     self.assertEqual(Decorator.decorator(0), 5)
Esempio n. 3
0
 def notification_whats_app_on(self):
     self.__notifier = Decorator.OnWhatsAppDecorator(self.__notifier)
     self.notify_whats_app = True
Esempio n. 4
0
 def notification_viber_on(self):
     self.__notifier = Decorator.OnViberDecorator(self.__notifier)
     self.notify_viber = True
Esempio n. 5
0
 def notification_telegram_on(self):
     self.__notifier = Decorator.OnTelegramDecorator(self.__notifier)
     self.notify_telegram = True
Esempio n. 6
0
 def notification_email_on(self):
     self.__notifier = Decorator.OnEmailDecorator(self.__notifier)
     self.notify_email = True
Esempio n. 7
0
 def notification_inside_network_on(self):
     self.__notifier = Decorator.InsideNetworkDecorator(self.__notifier)
     self.notify_inside_network = True