Exemple #1
0
            When_a_bet_definition_with_close_date_earlier_than_the_starting_date_of_the_contest_is_added_Then_an_exception_is_thrown
                ()
            {
                //Arrange
                var sampleBetDefinition = new BetDefinitionStub(ContestStartDate - new TimeSpan(0, 0, 0, 1));

                //Act & Assert
                Assert.Throws <ArgumentException>(() => Target.AddBetDefinition(sampleBetDefinition));
            }
Exemple #2
0
            When_a_bet_definition_with_close_date_later_than_the_starting_date_of_the_contest_is_added_Then_the_definition_is_added_to_the_list_of_bets
                ()
            {
                //Arrange
                var sampleBetDefinition = new BetDefinitionStub(ContestStartDate + new TimeSpan(0, 0, 0, 1));

                //Act
                Target.AddBetDefinition(sampleBetDefinition);

                //Assert
                Assert.IsNotNull(Target.BetsList.Single(bet => bet == sampleBetDefinition));
            }
Exemple #3
0
 When_null_is_passed_as_bet_definition_Then_an_exception_is_thrown
     ()
 {
     //Act & Assert
     Assert.Throws <ArgumentNullException>(() => Target.AddBetDefinition(null));
 }