Exemplo n.º 1
0
        public void Equals_returns_true_for_matching_tag()
        {
            // arrange
            TagByteArray target;
            TagByteArray other;
            bool         actual;

            target = new TagByteArray("alpha", new byte[] { 2, 4, 8, 16, 32, 64, 128 });
            other  = new TagByteArray("alpha", new byte[] { 2, 4, 8, 16, 32, 64, 128 });

            // act
            actual = target.Equals(other);

            // assert
            Assert.True(actual);
        }
Exemplo n.º 2
0
        public void Equals_returns_false_with_different_value()
        {
            // arrange
            TagByteArray target;
            TagByteArray other;
            bool         actual;

            target = new TagByteArray(string.Empty, new byte[] { 2, 4, 8, 16, 32, 64, 128 });
            other  = new TagByteArray(string.Empty, new byte[] { 2, 4, 8, 16, 32, 48, 128 });

            // act
            actual = target.Equals(other);

            // assert
            Assert.False(actual);
        }
Exemplo n.º 3
0
        public void Equals_returns_false_with_different_name()
        {
            // arrange
            TagByteArray target;
            TagByteArray other;
            bool         actual;

            target = new TagByteArray("Alpha", new byte[] { 2, 4, 8, 16, 32, 64, 128 });
            other  = new TagByteArray("Beta", new byte[] { 2, 4, 8, 16, 32, 64, 128 });

            // act
            actual = target.Equals(other);

            // assert
            Assert.IsFalse(actual);
        }