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)); }
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)); }