public void CompareTo_StringAndLanguageAttributeFileAccessEnum_RelationOfUnderlyingEnumValues(
            [Values(StringAndLanguageAttributeFileAccess.Delete, StringAndLanguageAttributeFileAccess.Read, StringAndLanguageAttributeFileAccess.ReadWrite, StringAndLanguageAttributeFileAccess.Write)]
            Enum value,

            [Values(StringAndLanguageAttributeFileAccess.Delete, StringAndLanguageAttributeFileAccess.Read, StringAndLanguageAttributeFileAccess.ReadWrite, StringAndLanguageAttributeFileAccess.Write)]
            Enum valueToCompare,

            [Values(EnumStringRepresentationUsage.ToStringMethod, EnumStringRepresentationUsage.StringAttribute, EnumStringRepresentationUsage.LanguageStringAttribute)]
            EnumStringRepresentationUsage enumStringRepresentationUsage,

            [Values(EnumStringRepresentationUsage.ToStringMethod, EnumStringRepresentationUsage.StringAttribute, EnumStringRepresentationUsage.LanguageStringAttribute)]
            EnumStringRepresentationUsage enumStringRepresentationUsageOfValueToCompare)
        {
            var enumString = EnumString.Create <StringAndLanguageAttributeFileAccess>((StringAndLanguageAttributeFileAccess)value, enumStringRepresentationUsage);
            var other      = EnumString.Create <StringAndLanguageAttributeFileAccess>((StringAndLanguageAttributeFileAccess)valueToCompare, enumStringRepresentationUsageOfValueToCompare);

            Assert.AreEqual(value.CompareTo(valueToCompare), enumString.CompareTo(other));
        }
 public Enum Parse_StringAttributeFileAccessEnumName_ValidEnumValue(string stringRepresentation, EnumStringRepresentationUsage enumStringRepresentationUsage)
 {
     return(EnumString <StringAttributeFileAccess> .Parse(stringRepresentation, enumStringRepresentationUsage));
 }
 public Enum Parse_PartialAttributeWeekdaysEnumName_ValidEnumValue(string stringRepresentation, EnumStringRepresentationUsage enumStringRepresentationUsage)
 {
     return(EnumString <PartialAttributeWeekdays> .Parse(stringRepresentation, enumStringRepresentationUsage));
 }
Beispiel #4
0
 /// <summary>Compares the current object with another object of the same type.
 /// </summary>
 /// <param name="other">An object to compare with this object.</param>
 /// <returns>
 /// A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:
 /// Less than zero: This object is less than the <paramref name="other"/> parameter.
 /// Zero: This object is equal to <paramref name="other"/>.
 /// Greater than zero: This object is greater than <paramref name="other"/>.
 /// </returns>
 public int CompareTo(EnumString <TEnum> other)
 {
     return(Value.CompareTo(other.Value));
 }
Beispiel #5
0
 public Enum Parse_FileAccessEnumName_ValidEnumValue(string stringRepresentation, EnumStringRepresentationUsage enumStringRepresentationUsage)
 {
     return(EnumString.Parse(typeof(FileAccess), stringRepresentation, enumStringRepresentationUsage));
 }
Beispiel #6
0
 public Enum Parse_StringAndLanguageAttributeFileAccessEnumName_ValidEnumValue(string stringRepresentation, EnumStringRepresentationUsage enumStringRepresentationUsage)
 {
     return(EnumString.Parse(typeof(StringAndLanguageAttributeFileAccess), stringRepresentation, enumStringRepresentationUsage));
 }