src/GenFx.Components.Tests/SteadyStateGeneticAlgorithmTest.cs
/// <summary>
/// Tests that the object can be serialized and deserialized.
/// </summary>
Tests that the object can be serialized and deserialized.
Tests that the object can be serialized and deserialized .
[Fact]
        public void SteadyStateGeneticAlgorithm_Serialization()
        {
            SteadyStateGeneticAlgorithm algorithm = new SteadyStateGeneticAlgorithm
            {
                PopulationReplacementValue = new PopulationReplacementValue(3, ReplacementValueKind.Percentage)
            };
            SteadyStateGeneticAlgorithm result = (SteadyStateGeneticAlgorithm)SerializationHelper.TestSerialization(
                algorithm, new Type[] { typeof(DefaultTerminator) });
            Assert.Equal(algorithm.PopulationReplacementValue.Kind, result.PopulationReplacementValue.Kind);
            Assert.Equal(algorithm.PopulationReplacementValue.Value, result.PopulationReplacementValue.Value);
        }
[ Fact ] public void SteadyStateGeneticAlgorithm_Serialization ( ) { SteadyStateGeneticAlgorithm algorithm = new SteadyStateGeneticAlgorithm { PopulationReplacementValue = new PopulationReplacementValue ( 3 , ReplacementValueKind . Percentage ) } ; SteadyStateGeneticAlgorithm result = ( SteadyStateGeneticAlgorithm ) SerializationHelper . TestSerialization ( algorithm , new Type [ ] { typeof ( DefaultTerminator ) } ) ; Assert . Equal ( algorithm . PopulationReplacementValue . Kind , result . PopulationReplacementValue . Kind ) ; Assert . Equal ( algorithm . PopulationReplacementValue . Value , result . PopulationReplacementValue . Value ) ; }
Tests that the object can be serialized and deserialized.
Tests that the object can be serialized and deserialized .