Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 47141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T16:04:33+00:00 2026-05-10T16:04:33+00:00

This might be an interesting question. I need to test that if I can

  • 0

This might be an interesting question. I need to test that if I can successfully upload and fetch the PDF file. This works for the text based files but I just wanted to check for PDF. For this unit test to run I need a PDF file. There are couple of options. I can create a dummy PDF file and store it some folder and read that file and save the file to the system. But now, my unit test is dependent on the PDF file. So, anyone who runs the unit test must have the PDF file which is kinda bad.

Another way for me is to create a PDF file. This is not a big deal as I can simply create a dummy file with the .pdf extension OR I can even use some PDF third party tool to create PDF file.

Another way also is to embed the PDF document as an embedded resource and then extract that from the assembly.

What do you think is the best way to handle this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T16:04:34+00:00Added an answer on May 10, 2026 at 4:04 pm

    Save a PDF file with your tests in a resources directory. Your tests should be as simple as possible, and creating a file is just one more point that could fail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The answer probably depends how critical it is for you… May 11, 2026 at 11:09 am
  • added an answer while (node.hasChildNodes()) { node.removeChild(node.lastChild); } May 11, 2026 at 11:09 am
  • added an answer This will calculate the exact age. The fractional part of… May 11, 2026 at 11:09 am

Related Questions

This might be an interesting question. I need to test that if I can
This might be an odd question, but when I scale my image in C#
I'm concerned that this might be working on an NP-Complete problem. I'm hoping someone
OK, this is an odd request, and it might not even be fully true...
This might be on the discussy side, but I would really like to hear
This might be a bit on the silly side of things but I need
This might be a stupid question but if there's a better or proper way
This might be a little hard to explain, but I will try. I want
This might be a old question: Why does IEnumerable<T> inherit from IEnumerable ? This
This might be a silly question: Does HTTP ever use the User Datagram Protocol?

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.