Пример #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();
        }
Пример #3
0
        /// <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));
 }