コード例 #1
0
        public void MaximumValueWithTime()
        {
            var  res   = ConvertStringToDateTime.Do(maxDTWithTime, true);
            bool equal = res.Date == maxDateTime.Date && res.Hour == maxDateTime.Hour && res.Minute == maxDateTime.Minute && res.Second == maxDateTime.Second;

            Assert.IsTrue(equal);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            List <String> transponderdataList = new List <string>();
            var           track1 = "BIJ515;12345;54321;17891;20180409153742853";
            var           track2 = "BIJ516;12345;54322;17891;20180409153742853";

            transponderdataList.Add(track1);
            transponderdataList.Add(track2);

            Faketransponderreciever myReciever = new Faketransponderreciever(transponderdataList);
            //var myReciever = Faketransponderreciever.ITransponderReceiver.CreateTransponderDataReceiver();

            IConvertStringToDateTime convertStringToDateTime = new ConvertStringToDateTime();
            ICalculateVelocity       calculateVelocity       = new CalculateVelocity();
            ICalculateCourse         calculateCourse         = new CalculateCourse();
            IWriter           writer             = new ConsoleWriter();
            ILogWriter        logWriterToFile    = new LogWriter();
            ILogWriter        logWriterToConsole = new LogWriter();
            SeperationEvent   seperationEvent    = new SeperationEvent();
            IEventController  eventController    = new EventController(logWriterToFile, logWriterToConsole);
            ISeperationTracks seperationTracks   = new SeperationTracks(seperationEvent, eventController);
            ISortingTracks    sortingTracks      = new SortingTracks(calculateVelocity, calculateCourse, writer, seperationTracks);
            IFilterAirspace   filterAirspace     = new FilterAirspace(sortingTracks);
            IConvertTrackData convertTrackData   = new ConvertTrackData(myReciever, convertStringToDateTime, filterAirspace);

            Console.ReadKey();
        }
コード例 #3
0
        static void Main(string[] args)
        {
            var myReciever = TransponderReceiverFactory.CreateTransponderDataReceiver();
            IConvertStringToDateTime convertStringToDateTime = new ConvertStringToDateTime();
            ICalculateVelocity       calculateVelocity       = new CalculateVelocity();
            ICalculateCourse         calculateCourse         = new CalculateCourse();
            IWriter           writer             = new ConsoleWriter();
            ILogWriter        logWriterToFile    = new LogWriter();
            ILogWriter        logWriterToConsole = new ConsoleSeperation();
            SeperationEvent   seperationEvent    = new SeperationEvent();
            IEventController  eventController    = new EventController(logWriterToFile, logWriterToConsole);
            ISeperationTracks seperationTracks   = new SeperationTracks(seperationEvent, eventController);
            ISortingTracks    sortingTracks      = new SortingTracks(calculateVelocity, calculateCourse, writer, seperationTracks);
            IFilterAirspace   filterAirspace     = new FilterAirspace(sortingTracks);
            IConvertTrackData convertTrackData   = new ConvertTrackData(myReciever, convertStringToDateTime, filterAirspace);

            Console.ReadKey();
        }
 public void Setup()
 {
     _uut = new ConvertStringToDateTime();
 }
コード例 #5
0
        public void MediumValue()
        {
            var res = ConvertStringToDateTime.Do(medDTWithNone, false);

            Assert.AreEqual(res, medDateTimeWithNoTime.Date);
        }
コード例 #6
0
        public void MaximumValue()
        {
            var res = ConvertStringToDateTime.Do(maxDTWithNone, false);

            Assert.AreEqual(res, maxDateTime.Date);
        }
コード例 #7
0
        public void MediumValueWithTime()
        {
            var res = ConvertStringToDateTime.Do(medDTWithTime, true);

            Assert.AreEqual(res, medDateTime);
        }
コード例 #8
0
        public void MinimumValueWithTime()
        {
            var res = ConvertStringToDateTime.Do(minDTWithTime, true);

            Assert.AreEqual(res, minDateTime);
        }