public void repository_has_authentication() { FetchRepositories.Single().ShouldBeOfType <PreAuthenticatedRepository>() .Credentials .Check(_ => _.UserName.ShouldBe("sauron")) .Check(_ => _.Password.ShouldBe("itsmyprecious")); }
public void repository_has_authentication() { FetchRepositories.Single().Feature <ISupportAuthentication>() .CurrentCredentials .Check(_ => _.UserName.ShouldBe("sauron")) .Check(_ => _.Password.ShouldBe("itsmyprecious")); }
public void repository_supports_credentials_override() { var repo = FetchRepositories.Single().Feature <ISupportAuthentication>(); var auth = repo.WithCredentials(new NetworkCredential("saruman", "impersonator")); repo.CurrentCredentials .Check(_ => _.UserName.ShouldBe("saruman")) .Check(_ => _.Password.ShouldBe("impersonator")); auth.Dispose(); repo.CurrentCredentials .Check(_ => _.UserName.ShouldBe("sauron")) .Check(_ => _.Password.ShouldBe("itsmyprecious")); }
public void repository_has_no_authentication() { FetchRepositories.Single().ShouldBeOfType <InMemoryRepository>(); }
public void repository_has_no_authentication() { FetchRepositories.Single().Feature <ISupportAuthentication>().ShouldBeNull(); }