コード例 #1
0
        public void ConvertsToFalseWhenTheGivenIdIsNotAString()
        {
            // Arrange
            var subject = new ProfileToBoolConverter();

            // Act
            var actual = (bool)subject.Convert(FilteringProfile.MediumFiltering, null, 4, null);

            // Assert
            Assert.False(actual);
        }
コード例 #2
0
        public void ConvertsAFilterProfileToFalseWhenTheGivenIdDoesNotMatchTheProfile()
        {
            // Arrange
            var subject = new ProfileToBoolConverter();

            // Act
            var actual = (bool)subject.Convert(FilteringProfile.MediumFiltering, null, "somthingElse", null);

            // Assert
            Assert.False(actual);
        }
コード例 #3
0
        public void ConvertsToFalseWhenTheTheValueIsNotAFilteringProfile()
        {
            // Arrange
            var subject = new ProfileToBoolConverter();

            // Act
            var actual = (bool)subject.Convert("somethingElse", null, "somthingElse", null);

            // Assert
            Assert.False(actual);
        }
コード例 #4
0
        public void ConvertsAFilterProfileToTrueWhenTheGivenIdMatchesTheProfile()
        {
            // Arrange
            var subject = new ProfileToBoolConverter();

            // Act
            var actual = (bool)subject.Convert(FilteringProfile.MediumFiltering, null, "medium", null);

            // Assert
            Assert.True(actual);
        }