示例#1
0
        public void Equals_should_return_false_when_passed_another_instance_with_a_different_value()
        {
            var value1 = new Secret("Test Value");
            var value2 = new Secret("Different Value");

            value1.Equals(value2).Should().BeFalse();
        }
示例#2
0
        public void Equals_should_return_true_when_passed_another_instance_with_the_same_value()
        {
            var value1 = new Secret("Test Value");
            var value2 = new Secret("Test Value");

            value1.Equals(value2).Should().BeTrue();
        }
        /// <summary>
        /// Returns true if AppTemplateConfiguration instances are equal
        /// </summary>
        /// <param name="other">Instance of AppTemplateConfiguration to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AppTemplateConfiguration other)
        {
            if (other is null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     Name == other.Name ||
                     Name != null &&
                     Name.Equals(other.Name)
                     ) &&
                 (
                     Description == other.Description ||
                     Description != null &&
                     Description.Equals(other.Description)
                 ) &&
                 (
                     CreatedBy == other.CreatedBy ||
                     CreatedBy != null &&
                     CreatedBy.Equals(other.CreatedBy)
                 ) &&
                 (
                     CreatedAt == other.CreatedAt ||
                     CreatedAt != null &&
                     CreatedAt.Equals(other.CreatedAt)
                 ) &&
                 (
                     Id == other.Id ||
                     Id != null &&
                     Id.Equals(other.Id)
                 ) &&
                 (
                     Secret == other.Secret ||
                     Secret != null &&
                     Secret.Equals(other.Secret)
                 ) &&
                 (
                     Enabled == other.Enabled ||

                     Enabled.Equals(other.Enabled)
                 ));
        }
示例#4
0
        public void Equals_should_return_false_when_passed_null()
        {
            var value1 = new Secret(testValue);

            value1.Equals(null).Should().BeFalse();
        }
示例#5
0
 public static bool IsCorrect(string phrase)
 {
     return(Secret.Equals(phrase));
 }