public void NullEndorsementsParameterShouldThrow() { Action action = () => EndorsementsValidator.Validate("foo", null); action.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("endorsements"); }
public void UnendorsedChannelIdShouldFail() { var isEndorsed = EndorsementsValidator.Validate("channelOne", new HashSet <string>()); isEndorsed.Should().BeFalse(); }
public void NullChannelIdParameterShouldPass() { var isEndorsed = EndorsementsValidator.Validate(null, new HashSet <string>()); isEndorsed.Should().BeTrue(); }
public void EndorsedChannelIdShouldPassWithTwoEndorsements() { bool isEndorsed = EndorsementsValidator.Validate("right", new[] { "right", "wrong" }); isEndorsed.Should().BeTrue(); }
public void MismatchedEndorsementsChannelIdShouldFail() { bool isEndorsed = EndorsementsValidator.Validate("right", new[] { "wrong" }); isEndorsed.Should().BeFalse(); }
public void UnendorsedChannelIdShouldFail() { bool isEndorsed = EndorsementsValidator.Validate("channelOne", new string[] { }); isEndorsed.Should().BeFalse(); }
public void NullChannelIdParameterShouldPass() { bool isEndorsed = EndorsementsValidator.Validate(null, new string[] { }); isEndorsed.Should().BeTrue(); }