public void Log_separationEvent_returnTrue()
        {
            File.WriteAllText(@"ATMLogger.txt", string.Empty);
            _separation.DetectWarning(new List <IATMTransponderData> {
                new ATMTransponderData("E15", new ATMCoordinate(10987, 10987, 1024), "20151105134923729"), new ATMTransponderData("E16", new ATMCoordinate(11987, 14987, 1200), "20151105134923729")
            });
            var textFromFile =
                (File.ReadLines("ATMLogger.txt").Last().Contains("20151105134923729 Separation Warning E16 E15 Activated"));

            Assert.IsTrue(textFromFile);
        }
Пример #2
0
        public void DetectWarning_NoData_NoWarning()
        {
            var eventTriggered = 0;

            ATMWarning.WarningEvent += (sender, args) =>
            {
                eventTriggered++;
            };

            _separation.DetectWarning(new List <IATMTransponderData>());
            Assert.That(eventTriggered, Is.EqualTo(0));
        }
Пример #3
0
        public void DetectWarning_NoData_NoWarningEvent()
        {
            int warningEventCalled = 0;

            ATMWarning.WarningEvent += (sender, args) => warningEventCalled++;
            _uut.DetectWarning(new List <IATMTransponderData>());

            Assert.That(warningEventCalled, Is.EqualTo(0));
        }