Exemplo n.º 1
0
            public void Null_Other_Returns_False()
            {
                //Arrange
                var header = new MimeHeader("foo", "bar");
                var entity = new MimeEntity(new[] { header }, _helloWorldStream);

                //Act
                var result = entity.Equals(null);

                //Assert
                Assert.That(result, Is.False);
            }
Exemplo n.º 2
0
            public void Are_Equal()
            {
                //Arrange
                var header = new MimeHeader("foo", "bar");
                var entity = new MimeEntity(new [] { header }, _helloWorldStream);
                var other  = new MimeEntity(new [] { header }, _helloWorldStream);

                //Act
                var result = entity.Equals(other);

                //Assert
                Assert.That(result, Is.True);
            }
Exemplo n.º 3
0
            public void Are_Equal_With_Multiple_Headers()
            {
                //Arrange
                var headersList = new List <MimeHeader>
                {
                    new MimeHeader("foo", "bar"),
                    new MimeHeader("bar", "foo")
                };
                var entity = new MimeEntity(headersList, _helloWorldStream);
                var other  = new MimeEntity(headersList, _helloWorldStream);

                //Act
                var result = entity.Equals(other);

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