public void Return_Instance_Of_FlatValueTaxRate_When_Called() { //map classes _mapper = new Mapper(new MapperConfiguration(cfg => cfg.CreateMap <FlatValueTaxRate, Dto.DataAccess.FlatValueTaxRate>() )); // instantiate data access class _taxDataAccess = new TaxDataAccess(_taxAdministrationContext.Object, _mapper); _mockFlatValueTaxRate = new Mock <DbSet <FlatValueTaxRate> >(); _mockFlatValueTaxRate.As <IQueryable <FlatValueTaxRate> >().Setup(m => m.Provider).Returns(_queryableFlatValueTaxRate.Provider); _mockFlatValueTaxRate.As <IQueryable <FlatValueTaxRate> >().Setup(m => m.Expression).Returns(_queryableFlatValueTaxRate.Expression); _mockFlatValueTaxRate.As <IQueryable <FlatValueTaxRate> >().Setup(m => m.ElementType).Returns(_queryableFlatValueTaxRate.ElementType); _mockFlatValueTaxRate.As <IQueryable <FlatValueTaxRate> >().Setup(m => m.GetEnumerator()).Returns(_queryableFlatValueTaxRate.GetEnumerator); _taxAdministrationContext.Setup(m => m.FlatValueTaxRate).Returns(_mockFlatValueTaxRate.Object); Assert.IsInstanceOf <Dto.DataAccess.FlatValueTaxRate>(_taxDataAccess.GetFlatValueTaxRate()); }