public void Should_DeleteEntity() { var tenderAttachment = new TenderAttachment(); tenderAttachment.DeleteAttachment(); tenderAttachment.State.ShouldBe(SharedKernal.ObjectState.Deleted); }
public void Should_UpdatePHPData() { var tenderAttachment = new TenderAttachment(); tenderAttachment.UpdatePHPData(_fileNetReferenceId); tenderAttachment.FileNetReferenceId.ShouldBe(_fileNetReferenceId); tenderAttachment.State.ShouldBe(SharedKernal.ObjectState.Modified); }
public void Should_DeactivateEntity() { var tenderAttachment = new TenderAttachment(); tenderAttachment.DeActive(); tenderAttachment.IsActive.ShouldBe(false); tenderAttachment.State.ShouldBe(SharedKernal.ObjectState.Modified); }
public void Should_SetAddedState() { var tenderAttachment = new TenderAttachment(); tenderAttachment.SetAddedState(); tenderAttachment.TenderAttachmentId.ShouldBe(0); tenderAttachment.State.ShouldBe(SharedKernal.ObjectState.Added); }
public async Task <TenderAttachment> UpdateAttachmentAsync(TenderAttachment tenderAttachment) { Check.ArgumentNotNull(nameof(tenderAttachment), tenderAttachment); _context.TenderAttachments.Update(tenderAttachment); await _context.SaveChangesAsync(); return(tenderAttachment); }
public void Should_UpdateChangStatus() { var tenderAttachment = new TenderAttachment(); tenderAttachment.UpdateChangStatus(_changeStatusId, _reviewStatusId, _rejectReason); tenderAttachment.ChangeStatusId.ShouldBe(_changeStatusId); tenderAttachment.ReviewStatusId.ShouldBe(_reviewStatusId); tenderAttachment.RejectionReason.ShouldBe(_rejectReason); tenderAttachment.State.ShouldBe(SharedKernal.ObjectState.Modified); }
public void Should_Constructor_SetValues() { var tenderAttachment = new TenderAttachment(_name, _fileNetReferenceId, _attachmentTypeId, _changeStatusId, _reviewStatusId); tenderAttachment.ShouldNotBeNull(); tenderAttachment.Name.ShouldBe(_name); tenderAttachment.FileNetReferenceId.ShouldBe(_fileNetReferenceId); tenderAttachment.AttachmentTypeId.ShouldBe(_attachmentTypeId); tenderAttachment.ChangeStatusId.ShouldBe(_changeStatusId); tenderAttachment.ReviewStatusId.ShouldBe(_reviewStatusId); tenderAttachment.State.ShouldBe(SharedKernal.ObjectState.Added); }
public void Should_Empty_Construct_TenderAttachment() { var tenderAttachment = new TenderAttachment(); tenderAttachment.ShouldNotBeNull(); }