コード例 #1
0
        public void Part1()
        {
            SatelliteData satelliteData = new SatelliteData(StringListRetriever.Retreive("InputList19.txt").ToList());
            List <string> validMessages = ValidSatelliteMessageCreator.CreateList(satelliteData);

            Assert.Equal(142, satelliteData.Messages.Count(x => validMessages.Any(y => y == x)));
        }
コード例 #2
0
        public void Part1Sample()
        {
            SatelliteData satelliteData = new SatelliteData(GetPart1SampleData());
            List <string> validMessages = ValidSatelliteMessageCreator.CreateList(satelliteData);

            Assert.Equal(8, validMessages.Count);
            Assert.Equal(2, satelliteData.Messages.Count(x => validMessages.Any(y => y == x)));
        }