Exemplo n.º 1
0
        public void Matches_returns_false_for_a_ticket_which_has_no_labels(Ticket ticket)
        {
            // Arrange
            var labeNameOne = "one";
            var labeNameTwo = "two";

            ticket.Labels.Clear();
            var sut = new HasLabel(labeNameOne, labeNameTwo);

            // Act
            var result = sut.Matches(ticket);

            // Assert
            Assert.That(result, Is.False);
        }
Exemplo n.º 2
0
        public void Matches_returns_true_for_a_ticket_which_has_one_of_the_named_labels(Ticket ticket)
        {
            // Arrange
            var labeNameOne = "one";
            var labeNameTwo = "two";

            ticket.Labels.Add(new Label {
                Name = labeNameTwo
            });
            var sut = new HasLabel(labeNameOne, labeNameTwo);

            // Act
            var result = sut.Matches(ticket);

            // Assert
            Assert.That(result, Is.True);
        }
Exemplo n.º 3
0
        public void Matches_returns_true_for_a_ticket_which_has_both_named_labels_and_more(Ticket ticket,
                                                                                           string anotherLabelName)
        {
            // Arrange
            var labeNameOne = "one";
            var labeNameTwo = "two";

            ticket.Labels.Add(new Label {
                Name = labeNameOne
            });
            ticket.Labels.Add(new Label {
                Name = labeNameTwo
            });
            ticket.Labels.Add(new Label {
                Name = anotherLabelName
            });
            var sut = new HasLabel(labeNameOne, labeNameTwo);

            // Act
            var result = sut.Matches(ticket);

            // Assert
            Assert.That(result, Is.True);
        }