public static void Setup(TestContext testContext) { var mockedConfigProvider = new Mock <ISiteConfiguration>(); mockedConfigProvider.Setup(x => x.WebsiteDomain).Returns("supersecure.site"); _redirectProvider = new RedirectProvider(mockedConfigProvider.Object); }
public static void Setup(TestContext testContext) { var mockedConfigProvider = new Mock <ISiteConfiguration>(); mockedConfigProvider.Setup(x => x.WebsiteDomain).Returns("supersecure.site"); mockedConfigProvider.Setup(x => x.SecureMode).Returns(true); // True to indicate secure mode is to activated _redirectProvider = new RedirectProvider(mockedConfigProvider.Object); }
public void ReturnTheProperParameterNameIfTheServiceProviderIsNotProvided() { String parameterName = "serviceProvider"; try { var target = new RedirectProvider(null); } catch (ArgumentNullException ex) { Assert.Equal(parameterName, ex.ParamName); } }