public void Command_Throws_If_Artist_Is_Missing( Guid albumId, string category, CheckoutRequest checkout, CompletionStatusReference completionStatus, string countryOfOrigin, string countryPurchased, DateTimeOffset purchasedOn, int discogsId, string genre, bool hasDigitalDownload, string imageUrl, bool isNewPurchase, bool isPhysical, bool isReissue, ItemStorageRequest itemStorage, string locationPurchased, MediaTypeReference mediaType, string notes, string recordLabel, int?reissueYear, SizeReference size, SpeedReference speed, string style, int timesCompleted, string title, int yearReleasedOn) { Action createWithMissingArtist = () => new AlbumUpdateCommand( albumId, string.Empty, category, checkout, completionStatus, countryOfOrigin, countryPurchased, discogsId, genre, hasDigitalDownload, imageUrl, isNewPurchase, isPhysical, isReissue, itemStorage, locationPurchased, mediaType, notes, purchasedOn, recordLabel, reissueYear, size, speed, style, timesCompleted, title, yearReleasedOn, _testUser); createWithMissingArtist.Should().Throw <ArgumentException>(); }
public void Request_Throws_If_ReissueYear_Is_Negative_And_IsReissue_Is_True( string artist, string category, CheckoutRequest checkout, CompletionStatusReference completionStatus, string countryOfOrigin, string countryPurchased, DateTimeOffset purchasedOn, int discogsId, string genre, bool hasDigitalDownload, string imageUrl, bool isNewPurchase, bool isPhysical, ItemStorageRequest itemStorage, string locationPurchased, MediaTypeReference mediaType, string notes, string recordLabel, SizeReference size, SpeedReference speed, string style, int timesCompleted, string title, int yearReleasedOn) { Action createWithNegativeReissueYearWhenIsReissueIsTrue = () => new AlbumSubmissionRequest( artist, category, checkout, completionStatus, countryOfOrigin, countryPurchased, discogsId, genre, hasDigitalDownload, imageUrl, isNewPurchase, isPhysical, true, itemStorage, locationPurchased, mediaType, notes, purchasedOn, recordLabel, -1, size, speed, style, timesCompleted, title, yearReleasedOn, _testUser); createWithNegativeReissueYearWhenIsReissueIsTrue.Should().Throw <ArgumentException>(); }
public AlbumUpdateCommand( Guid albumId, string artist, string category, CheckoutRequest checkout, CompletionStatusReference completionStatus, string countryOfOrigin, string countryPurchased, int discogsId, string genre, bool hasDigitalDownload, string imageUrl, bool isNew, bool isPhysical, bool isReissue, ItemStorageRequest itemStorage, string locationPurchased, MediaTypeReference mediaType, string notes, DateTimeOffset purchasedOn, string recordLabel, int?reissueYear, SizeReference size, SpeedReference speed, string style, int timesCompleted, string title, int yearReleasedOn, ApplicationUser user) { Guard.Against.Default(albumId, nameof(albumId)); Guard.Against.NullOrWhiteSpace(artist, nameof(artist)); Guard.Against.NullOrWhiteSpace(title, nameof(title)); Guard.Against.Null(user, nameof(user)); Guard.Against.Default(user.Id, nameof(user.Id)); AlbumId = albumId; Artist = artist; Category = category; Checkout = checkout; CompletionStatus = completionStatus; CountryOfOrigin = countryOfOrigin; CountryPurchased = countryPurchased; DiscogsId = discogsId; Genre = genre; HasDigitalDownload = hasDigitalDownload; ImageUrl = imageUrl; IsNew = isNew; IsPhysical = isPhysical; IsReissue = isReissue; ItemStorage = itemStorage; LocationPurchased = locationPurchased; MediaType = mediaType; Notes = notes; PurchasedOn = purchasedOn; RecordLabel = recordLabel; ReissueYear = reissueYear; Size = size; Speed = speed; Style = style; TimesCompleted = timesCompleted; Title = title; YearReleasedOn = yearReleasedOn; User = user; }