public void When_ThereAreMoreParts_ShouldThrowAnException() { Should.Throw <FormatException>(() => { var _ = ScramAttribute.Parse("value"); }); }
public void When_NameIsTwoCharacters_ShouldThrowAnException() { Should.Throw <FormatException>(() => { var _ = ScramAttribute.Parse("bh=name"); }); }
public void When_CreatingTwoAttributes_TheHashCodesShouldBeEqual() { var first = ScramAttribute.Parse("v=rmF9pqV8S7suAoZWja4dJRkFsKQ="); var second = new ServerSignatureAttribute("rmF9pqV8S7suAoZWja4dJRkFsKQ="); first.GetHashCode().ShouldBe(second.GetHashCode()); }
public void When_CreatedByParsing_ValueShouldBeValid() { var attribute = ScramAttribute.Parse("v=rmF9pqV8S7suAoZWja4dJRkFsKQ="); var result = new ServerSignatureAttribute("rmF9pqV8S7suAoZWja4dJRkFsKQ="); attribute.ShouldBe(result); }
public void When_ParsingAnUnknownAttribute_ShouldBeValid() { var attribute = ScramAttribute.Parse("h=name"); attribute.ShouldBeOfType <UnknownAttribute>(); }
public void When_ParsingAClientProofAttribute_ShouldBeValid() { var attribute = ScramAttribute.Parse("p=v0X8v3Bz2T0CJGbJQyF0X+HI4Ts="); attribute.ShouldBeOfType <ClientProofAttribute>(); }
public void When_ParsingAChannelAttribute_ShouldBeValid() { var attribute = ScramAttribute.Parse("c=biws"); attribute.ShouldBeOfType <ChannelAttribute>(); }
public void When_ParsingAUserAttribute_ShouldBeValid() { var attribute = ScramAttribute.Parse("n=name"); attribute.ShouldBeOfType <UserAttribute>(); }
public void When_ParsingAnAuthorizationAttribute_ShouldBeValid() { var attribute = ScramAttribute.Parse("a=name"); attribute.ShouldBeOfType <AuthorizationIdentityAttribute>(); }
public void When_AttributeIsComparedToItself_ShouldBeEqual() { var attribute = ScramAttribute.Parse("v=rmF9pqV8S7suAoZWja4dJRkFsKQ="); Assert.True(attribute.Equals(attribute)); }
public void When_AttributeIsNotNull_ShouldBeEqual() { var attribute = ScramAttribute.Parse("v=rmF9pqV8S7suAoZWja4dJRkFsKQ="); Assert.False(attribute.Equals(null)); }