public void Test_Print_Redirect_To_404_On_Bad_Uid() { GiftController c = new GiftController(); var r = c.Print("fasdfsdfsdjfklah"); Assert.IsTrue(r is RedirectResult); }
public void Init() { var options = GetContextOptions(); _context = new ApplicationDbContext(options); _cartManager = new CartManager(_context); AddFakeServices(_context); _controller = new GiftController(_context, new FakeUserManager()); }
// Start is called before the first frame update void Start() { giftController = FindObjectOfType <GiftController>(); }
public TestBase() { _repository = Substitute.For <IRepository <Gift> >(); _logger = Substitute.For <ILogger <GiftController> >(); _sut = new GiftController(_logger, _repository); }
public GiftControllerTests() { _mockRepo = new Mock <IRepository <Gift> >(); _controller = new GiftController(_mockRepo.Object); }