Example #1
0
        public void WithClientSecret_WhenCalled_ReturnsClientSecretIdentityBuilder()
        {
            IClientSecretIdentityBuilder sut = CreateSut();

            IClientSecretIdentityBuilder result = sut.WithClientSecret(Fixture.Create <string>());

            Assert.That(result, Is.EqualTo(sut));
        }
        public void Build_WhereWithClientSecretHasBeenCalled_AssertCorrectClientSecret()
        {
            IClientSecretIdentityBuilder sut = CreateSut();

            string clientSecret          = Fixture.Create <string>();
            IClientSecretIdentity result = sut.WithClientSecret(clientSecret).Build();

            Assert.That(result.ClientSecret, Is.EqualTo(clientSecret));
        }
Example #3
0
        public void WithClientSecret_WhenClientSecretIsWhiteSpace_ThrowsArgumentNullException()
        {
            IClientSecretIdentityBuilder sut = CreateSut();

            ArgumentNullException result = Assert.Throws <ArgumentNullException>(() => sut.WithClientSecret(" "));

            Assert.That(result.ParamName, Is.EqualTo("clientSecret"));
        }