public void ConvertsBackReturnsNoFilteringProfileWhenCalledWithTrueAndTheIdIsNotMatching() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = (FilteringProfile)subject.ConvertBack(true, null, "somethigElse", null); // Assert Assert.Equal(FilteringProfile.NoFiltering, actual); }
public void ConvertBackReturnsBindingDoNothingWhenCalledWithFalse() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = subject.ConvertBack(false, null, "medium", null); // Assert Assert.Equal(Binding.DoNothing, actual); }
public void ConvertsBackReturnsTheProfileWhenCalledWithTrueAndIdIsMatching() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = (FilteringProfile)subject.ConvertBack(true, null, "medium", null); // Assert Assert.Equal(FilteringProfile.MediumFiltering, actual); }
public void ConvertsToFalseWhenTheGivenIdIsNotAString() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = (bool)subject.Convert(FilteringProfile.MediumFiltering, null, 4, null); // Assert Assert.False(actual); }
public void ConvertsToFalseWhenTheTheValueIsNotAFilteringProfile() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = (bool)subject.Convert("somethingElse", null, "somthingElse", null); // Assert Assert.False(actual); }
public void ConvertsAFilterProfileToFalseWhenTheGivenIdDoesNotMatchTheProfile() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = (bool)subject.Convert(FilteringProfile.MediumFiltering, null, "somthingElse", null); // Assert Assert.False(actual); }
public void ConvertsAFilterProfileToTrueWhenTheGivenIdMatchesTheProfile() { // Arrange var subject = new ProfileToBoolConverter(); // Act var actual = (bool)subject.Convert(FilteringProfile.MediumFiltering, null, "medium", null); // Assert Assert.True(actual); }