Пример #1
0
        public void GetPermittivity_Default_ReturnsOne()
        {
            // Arrange
            var parameter = new SpectrumUnit(300e-9, SpectrumUnitType.WaveLength);
            var target    = new LossyDielectric();

            // Act
            Complex result = target.GetPermittivity(parameter);

            // Assert
            Assert.AreEqual(Complex.One, result);
        }
Пример #2
0
        public void GetPermittivity_SetEpsilon_ReturnsOne()
        {
            // Arrange
            const double RelativePermittivity = 5.0;
            var          parameter            = new SpectrumUnit(300e-9, SpectrumUnitType.WaveLength);
            var          target = new LossyDielectric {
                Epsilon = RelativePermittivity
            };

            // Act
            Complex result = target.GetPermittivity(parameter);

            // Assert
            Assert.AreEqual(RelativePermittivity, result);
        }
Пример #3
0
        public void GetPermittivity_SetEpsilonAndConduct_ReturnsOne()
        {
            // Arrange
            const double RelativePermittivity = 5.0;
            const double Conductivity         = 5.0;
            var          parameter            = new SpectrumUnit(300e-9, SpectrumUnitType.WaveLength);
            var          target = new LossyDielectric
            {
                Epsilon      = RelativePermittivity,
                Conductivity = Conductivity
            };

            // Act
            Complex result = target.GetPermittivity(parameter);

            // Assert
            Assert.AreEqual(RelativePermittivity, result.Real);
            Assert.IsTrue(result.Imaginary < 0);
        }