コード例 #1
0
        public void BlobArtifactModelEquals_ReturnsFalseWhenObjectsAreDifferentTypes()
        {
            BlobArtifactModel blobArtifact = new BlobArtifactModel
            {
                Attributes = new Dictionary <string, string>
                {
                    { "NonShipping", true.ToString().ToLower() },
                },
                Id = null
            };

            Assert.False(blobArtifact.Equals("thisIsNotABlobArtifact!"));
        }
コード例 #2
0
        public void BlobArtifactModelEquals_ReturnsTrueWhenMatchingAttributesAreNull()
        {
            BlobArtifactModel blobArtifact = new BlobArtifactModel
            {
                Attributes = new Dictionary <string, string>
                {
                    { "NonShipping", true.ToString().ToLower() },
                },
                Id = null
            };

            BlobArtifactModel otherBlobArtifact = new BlobArtifactModel
            {
                Attributes = new Dictionary <string, string>
                {
                    { "NonShipping", true.ToString().ToLower() },
                },
                Id = null
            };

            Assert.True(blobArtifact.Equals(otherBlobArtifact));
        }
コード例 #3
0
        public void BlobArtifactModelEquals_ReturnsFalseWhenTwoObjectsDoNotHaveMatchingAttributes()
        {
            BlobArtifactModel blobArtifact = new BlobArtifactModel
            {
                Attributes = new Dictionary <string, string>
                {
                    { "Shipping", true.ToString().ToLower() },
                },
                Id = "AssetName"
            };

            BlobArtifactModel otherBlobArtifact = new BlobArtifactModel
            {
                Attributes = new Dictionary <string, string>
                {
                    { "NonShipping", true.ToString().ToLower() },
                },
                Id = "AssetName"
            };

            Assert.False(blobArtifact.Equals(otherBlobArtifact));
        }