public void CanBid_WithInvalidInput_ShouldReturnFalse()
        {
            // Arrange
            var model = new ItemDetailsServiceModel();
            // Act
            var result = this.bidService.CanBid(model);

            // Assert
            result
            .Should()
            .BeFalse();
        }
        public void CanBid_WithValidInput_ShouldReturnTrue()
        {
            // Arrange
            var model = new ItemDetailsServiceModel {
                EndTime = DateTime.UtcNow.AddDays(10),
            };
            // Act
            var result = this.bidService.CanBid(model);

            // Assert
            result
            .Should()
            .BeTrue();
        }
Example #3
0
 public bool CanBid(ItemDetailsServiceModel model)
 {
     return(model.EndTime >= DateTime.UtcNow && model.StartTime < DateTime.UtcNow);
 }