Population is normal with known variance and mean. Sample size is small. Which case? Given a population (normal distribution) mean and variance and a sample set with n<30 values, how should I perform hypothesis testing. My professor told me that I should be using the t-test for this case. 
I believe that I understand why a t-test is used. It is because we are not sure of the distribution that the sample values come from. We want to compare the mean against the normally distributed population.
Typically, this case would require we estimate the variance of the sample when finding the t-value. However, we are given the variance of the population. So should I instead use the given variance for my calculation?
$$
t = \frac{\overline{X}-\mu}{\frac{\sigma}{\sqrt{N}}}
$$
EDIT: I wanted to provide an example for clarification.
Company A releases the results of their new printer's performance. These results come from a normal distribution because they are based on averages.
$$
\mu_{A} = 40\\
\sigma_{A} = 5
$$
Company B wants to publish their printer results. They take the following 15 samples.
$$
B = \{ 25,35,50,20,30,25,30,35,40,45,20,25,30,35,35 \}
$$
Calculating the sample mean $\overline{B}$ and sample standard deviation $s_{B}$ is trivial.
Can company B make the claim that their printer performs better than company A?
Since the underlying distribution of $B$ is unknown, does that disqualify the use of the z-test for this problem? If I am to use a t-test, am I using $\sigma_{A}$ or $s_{B}$?
 A: If your distributions are known to be normal, and you have sample mean and standard deviation, you'd use a t-test.
If, however, you know the population standard deviation, then you would instead use that in place of the sample standard deviation, giving a z-test, not a t-test.
However, I have difficulty thinking of many practical situations where you'd know $\sigma$ but not have any information (outside the sample) on $\mu$.
===
Edit:
Given the way the question there is phrased, there's no particular reason to assume $A$'s sd would apply to $B$. 
If we treat that $\mu_A$ number as $A$'s population mean (which it isn't, really -- surely it's actually a sample value, even if from a big sample), then we can do a one-sample t-test to decide whether $B$'s population mean differs from 40. 
(Arguably, though, it should be a one-tailed test, since the clearly expressed alternative of interest is "better", not "different"). 
So now looking at the actual question, in the absence of a reason to think that $\sigma_B=5$, I'd agree that you would do a t-test rather than a z-test.
A: One sample t-test can be done for this in R as follows:
t.test(sample_data, mu=mu0)

see: http://www.instantr.com/2012/12/29/performing-a-one-sample-t-test-in-r/
