Upon becoming familiar with C#, I'm getting the following error when unit testing on the line where an assertion is made Assert.IsInstanceTypeOf.
Error CS0119 'Product' is a type, which is not valid in the given context
The matter of creating a type has been performed. What is causing this error to be raised?
UnitTest1.cs
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ProductNamespace;
namespace TestProject2
{
[TestClass]
public class TestProduct
{
[TestMethod]
public void TestNewProduct()
{
Product mock_product = new Product(4.95);
Assert.IsInstanceOfType(mock_product, Product);
}
}
}
Product.cs
namespace ProductNamespace
{
public class Product
{
private double price;
public Product(double price)
{
this.price = price;
}
}
}