ABsoluteMaybe.Tests.Domain.ExperimentTests.OptionConversionRateIsCountedProperly C# (CSharp) Method

OptionConversionRateIsCountedProperly() private method

private OptionConversionRateIsCountedProperly ( ) : void
return void
        public void OptionConversionRateIsCountedProperly()
        {
            //arrange
            var participants = new[]
                               	{
                               		new ParticipationRecord("user1", "OPTION_1", false, null),
                                    new ParticipationRecord("user2", "OPTION_1", true, DateTime.Now),
                                    new ParticipationRecord("user3", "OPTION_1", false, null),
                                    new ParticipationRecord("user4", "OPTION_1", true, DateTime.Now)
                               	};
            var exp = new Experiment(null, null, null, DateTime.Now, null, participants, new[] { "OPTION_1", "OPTION_2" });

            //act
            var options = exp.Options;

            //assert
            options.ElementAt(0).ConversionRate.ShouldEqual(.5);
        }