public void TestIsSatisfiedFalse() { ResourceContext context = new ResourceContext(); BearerProcessor processor = new BearerProcessor(new Mock<IServiceFactory>().Object); Assert.IsFalse(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedFalse() { ResourceContext context = new ResourceContext(); BearerProcessor processor = new BearerProcessor(new Mock <IServiceFactory>().Object); Assert.IsFalse(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedFalseWrongAuthorizaitonHeader() { ResourceContext context = new ResourceContext(); context.Headers = new NameValueCollection(); context.Headers["Authorization"] = "MAC token=\"something\",..."; BearerProcessor processor = new BearerProcessor(new Mock<IServiceFactory>().Object); Assert.IsFalse(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedFalseWrongAuthorizaitonHeader() { ResourceContext context = new ResourceContext(); context.Headers = new NameValueCollection(); context.Headers["Authorization"] = "MAC token=\"something\",..."; BearerProcessor processor = new BearerProcessor(new Mock <IServiceFactory>().Object); Assert.IsFalse(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedByHeaderTrue() { ResourceContext context = new ResourceContext(); context.Headers = new NameValueCollection(); context.Headers["Authorization"] = "Bearer 123456"; BearerProcessor processor = new BearerProcessor(new Mock<IServiceFactory>().Object); Assert.IsTrue(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedByFormTrue() { ResourceContext context = new ResourceContext(); context.Form = new NameValueCollection(); context.Form["bearer_token"] = "12345"; BearerProcessor processor = new BearerProcessor(new Mock<IServiceFactory>().Object); Assert.IsTrue(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedByHeaderTrue() { ResourceContext context = new ResourceContext(); context.Headers = new NameValueCollection(); context.Headers["Authorization"] = "Bearer 123456"; BearerProcessor processor = new BearerProcessor(new Mock <IServiceFactory>().Object); Assert.IsTrue(processor.IsSatisfiedBy(context)); }
public void TestIsSatisfiedByFormTrue() { ResourceContext context = new ResourceContext(); context.Form = new NameValueCollection(); context.Form["bearer_token"] = "12345"; BearerProcessor processor = new BearerProcessor(new Mock <IServiceFactory>().Object); Assert.IsTrue(processor.IsSatisfiedBy(context)); }