Exemple #1
0
        public void GetDemodulator_NoizyDemodulator_NullListValue_ThrowsNullReferenceException()
        {
            List <double> nullList         = null;
            var           inputStringParam = "not-sand";

            var demodulatorInstance = Demodulator.GetDemodulator(inputStringParam);

            Assert.NotNull(demodulatorInstance);
            Assert.Throws <NullReferenceException>(() => demodulatorInstance.Demodulate(nullList));
        }
Exemple #2
0
        public void GetDemodulator_NoizyDemodulator_NotNullListValue_ReturnsModifiedInputArrayAccordingToNoizyDemodulatorLogic()
        {
            var inputStringParam = "not-sand";
            var expectedResult   = _noizyDemodulationHandlerLogic(_testDoubleArray.First());

            var demodulatorInstance = Demodulator.GetDemodulator(inputStringParam);
            var modifiedArray       = demodulatorInstance.Demodulate(_testDoubleArray);

            Assert.NotNull(demodulatorInstance);
            Assert.IsType <NoizyDemodulator>(demodulatorInstance);
            Assert.NotEmpty(modifiedArray);
            Assert.Equal(expectedResult, modifiedArray.First());
        }