public static void Equals_ReturnsFalse_ForDistinctValues(string value1, string value2) { var bic1 = Bic.Parse(value1).Value; var bic2 = Bic.Parse(value2).Value; Assert.False(bic1.Equals(bic2)); }
public static void Equals_ReturnsTrue_ForIdenticalValues_AfterBoxing(string value1, string value2) { var bic1 = Bic.Parse(value1).Value; object bic2 = Bic.Parse(value2).Value; Assert.True(bic1.Equals(bic2)); }
public static void Inequality_ReturnsFalse_ForIdenticalValues(string value1, string value2) { var bic1 = Bic.Parse(value1).Value; var bic2 = Bic.Parse(value2).Value; Assert.False(bic1 != bic2); }
public static void Inequality_ReturnsTrue_ForDistinctValues(string value1, string value2) { var bic1 = Bic.Parse(value1).Value; var bic2 = Bic.Parse(value2).Value; Assert.True(bic1 != bic2); }
public static void Equality_ReturnsTrue_ForIdenticalValues(string value1, string value2) { var bic1 = Bic.Parse(value1).Value; var bic2 = Bic.Parse(value2).Value; Assert.True(bic1 == bic2); }
public static void Equals_IsAbelian(string value1, string value2) { var bic1a = Bic.Parse(value1).Value; var bic1b = Bic.Parse(value1).Value; var bic2 = Bic.Parse(value2).Value; Assert.Equal(bic1a.Equals(bic1b), bic1b.Equals(bic1a)); Assert.Equal(bic1a.Equals(bic2), bic2.Equals(bic1a)); }
public static void Equals_ReturnsFalse_ForOtherTypes(string value) { var bic = Bic.Parse(value).Value; Assert.False(bic.Equals(null)); Assert.False(bic.Equals(1)); Assert.False(bic.Equals(value)); Assert.False(bic.Equals(new Object())); Assert.False(bic.Equals(new My.Val(1))); Assert.False(bic.Equals(new My.Obj())); }
public static void Parse_SetBusinessPartyCorrectly(string value, string expectedValue) { var bic = Bic.Parse(value); Assert.Equal(expectedValue, bic.Value.BusinessParty); }
public static void ToString_ReturnsValue(string value) { var bic = Bic.Parse(value).Value; Assert.Equal(value, bic.ToString()); }
public static void Parse_ReturnsNull_ForInvalidSwiftValue(string value) => Assert.False(Bic.Parse(value, BicVersion.Swift).HasValue);
public static void GetHashCode_ReturnsHashCodeValue(string value) { var bic = Bic.Parse(value).Value; Assert.Equal(value.GetHashCode(), bic.GetHashCode()); }
public static void Equals_IsReflexive(string value) { var bic = Bic.Parse(value).Value; Assert.True(bic.Equals(bic)); }
public static void Parse_ReturnsTrue_ForValidISOInput(string value) { var bic = Bic.Parse(value, BicVersion.ISO); Assert.True(bic.HasValue); }
public static void Parse_SetLocationCodeCorrectly(string value, string expectedValue) { var bic = Bic.Parse(value); Assert.Equal(expectedValue, bic.Value.LocationCode); }
public static void Parse_ReturnsNull_ForInvalidLength(string value) => Assert.False(Bic.Parse(value).HasValue);
public static void Parse_ReturnsNull_ForNull() => Assert.False(Bic.Parse(null).HasValue);
public static void Parse_ReturnsFalse_ForInvalidSwiftInput(string value) { var bic = Bic.Parse(value, BicVersion.Swift); Assert.False(bic.HasValue); }
public static void Parse_Succeeds_ForValidSwiftValue(string value) => Assert.True(Bic.Parse(value, BicVersion.Swift).HasValue);
public static void Parse_SetIsSwiftConnectedCorrectly(string value, bool expectedValue) { var bic = Bic.Parse(value); Assert.Equal(expectedValue, bic.Value.IsSwiftConnected); }
public static void Parse_SetIsPrimaryOfficeCorrectly(string value, bool expectedValue) { var bic = Bic.Parse(value); Assert.Equal(expectedValue, bic.Value.IsPrimaryOffice); }