Exemple #1
0
        public void Demodulator_Demodulate_NoizyDemodulatorStrategy_ReturnsListModifiedAccordingToNoizyDemodulatorLogic()
        {
            var expectedResult = TestData.NoizyDemodulationHandlerLogic(_testDoubleArray.First());
            var demodulator    = new Demodulator(new NoizyDemodulator());

            var actualResult = demodulator.Demodulate(_testDoubleArray);

            Assert.Equal(expectedResult, actualResult.First());
        }
Exemple #2
0
        public void Demodulator__Demodulate_PassedNullListValue_ThrowsArgumentNullException()
        {
            List <double> nullList          = null;
            var           simpleDemodulator = new Demodulator(new SimpleDemodulator());
            var           noisyDemodulator  = new Demodulator(new NoizyDemodulator());

            Assert.Throws <ArgumentNullException>(() => simpleDemodulator.Demodulate(nullList));
            Assert.Throws <ArgumentNullException>(() => noisyDemodulator.Demodulate(nullList));
        }
Exemple #3
0
        static void Main(string[] args)
        {
            var input = "[0,-1,0]";
            var entry = Parser.Parse(input);
            var mo    = entry.Modulate();

            Console.WriteLine(mo);
            var zzz = Demodulator.Demodulate(mo);

            zzz.Print(0);
        }