Exemplo n.º 1
0
        public void NullEndorsementsParameterShouldThrow()
        {
            Action action = () => EndorsementsValidator.Validate("foo", null);

            action.Should().Throw <ArgumentNullException>().And.ParamName.Should().Be("endorsements");
        }
Exemplo n.º 2
0
        public void UnendorsedChannelIdShouldFail()
        {
            var isEndorsed = EndorsementsValidator.Validate("channelOne", new HashSet <string>());

            isEndorsed.Should().BeFalse();
        }
Exemplo n.º 3
0
        public void NullChannelIdParameterShouldPass()
        {
            var isEndorsed = EndorsementsValidator.Validate(null, new HashSet <string>());

            isEndorsed.Should().BeTrue();
        }
Exemplo n.º 4
0
        public void EndorsedChannelIdShouldPassWithTwoEndorsements()
        {
            bool isEndorsed = EndorsementsValidator.Validate("right", new[] { "right", "wrong" });

            isEndorsed.Should().BeTrue();
        }
Exemplo n.º 5
0
        public void MismatchedEndorsementsChannelIdShouldFail()
        {
            bool isEndorsed = EndorsementsValidator.Validate("right", new[] { "wrong" });

            isEndorsed.Should().BeFalse();
        }
Exemplo n.º 6
0
        public void UnendorsedChannelIdShouldFail()
        {
            bool isEndorsed = EndorsementsValidator.Validate("channelOne", new string[] { });

            isEndorsed.Should().BeFalse();
        }
Exemplo n.º 7
0
        public void NullChannelIdParameterShouldPass()
        {
            bool isEndorsed = EndorsementsValidator.Validate(null, new string[] { });

            isEndorsed.Should().BeTrue();
        }