public TestFilmFormationConfig()
 {
     SimulationBoxFactory            = new AbsoluteTetragonalSimulationBoxFactory();
     SingleParticleDepositionHandler = new BallisticSingleParticleDepositionHandler();
     AggregateDepositionHandler      = new BallisticAggregateDepositionHandler(SingleParticleDepositionHandler);
     WallCollisionHandler            = new PeriodicBoundaryCollisionHandler();
     NeighborslistFactory            = new AccordNeighborslistFactory();
 }
        private void IsWithoutContactTest_HasContact_ShouldBeFalse()
        {
            var spHandler  = new BallisticSingleParticleDepositionHandler();
            var aggHandler = new BallisticAggregateDepositionHandler(spHandler);

            var isWithoutContact = aggHandler.IsWithoutContact(20, _config.LargeNumber);

            Assert.False(isWithoutContact);
        }
        private void DepositAggregateOnGroundTest()
        {
            var spHandler  = new BallisticSingleParticleDepositionHandler();
            var aggHandler = new BallisticAggregateDepositionHandler(spHandler);
            var aggregate  = GetExampleAggregate();

            aggHandler.DepositOnGround(aggregate);
            Assert.Equal(1.0, aggregate.Cluster.SelectMany(c => c.PrimaryParticles).Select(p => p.Position.Z).Min());
        }
        private void IsWithoutContactTest_NoContact_ShouldBeTrue()
        {
            var spHandler  = new BallisticSingleParticleDepositionHandler();
            var aggHandler = new BallisticAggregateDepositionHandler(spHandler);

            var distance = _config.LargeNumber;

            var isWithoutContact = aggHandler.IsWithoutContact(distance, _config.LargeNumber);

            Assert.True(isWithoutContact);
        }
        private void DepositAtParticleTest_CorrectDepositionDistance()
        {
            var spHandler  = new BallisticSingleParticleDepositionHandler();
            var aggHandler = new BallisticAggregateDepositionHandler(spHandler);

            var aggregate = GetExampleAggregate();

            aggHandler.DepositAtParticle(aggregate, 20);

            Assert.Equal(78.0, aggregate.Cluster.SelectMany(c => c.PrimaryParticles).Select(p => p.Position.Z).Min());
        }
        private async Task DepositAggregate_DepositOnGround()
        {
            var spHandler  = new BallisticSingleParticleDepositionHandler();
            var aggHandler = new BallisticAggregateDepositionHandler(spHandler);

            var aggregate     = GetExampleAggregate();
            var neighborslist = new Mock <INeighborslist>().Object;
            var ct            = new CancellationToken();
            await aggHandler.DepositAggregate_Async(aggregate, GetDepositedParticlesFarAway(), neighborslist, GetDepositedParticlesFarAway().GetMaxRadius(), Environment.ProcessorCount, _config.Delta, ct);

            Assert.Equal(1.0, aggregate.Cluster.SelectMany(c => c.PrimaryParticles).Select(p => p.Position.Z).Min());
        }