• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

fluentassertions / fluentassertions.datasets / 13245501597

10 Feb 2025 04:22PM UTC coverage: 94.362% (+0.3%) from 94.089%
13245501597

Pull #24

github

web-flow
Bump Verify.Xunit from 28.9.0 to 28.10.1 in the xunit group

Bumps the xunit group with 1 update: [Verify.Xunit](https://github.com/VerifyTests/Verify).


Updates `Verify.Xunit` from 28.9.0 to 28.10.1
- [Release notes](https://github.com/VerifyTests/Verify/releases)
- [Commits](https://github.com/VerifyTests/Verify/compare/28.9.0...28.10.1)

---
updated-dependencies:
- dependency-name: Verify.Xunit
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: xunit
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #24: Bump Verify.Xunit from 28.9.0 to 28.10.1 in the xunit group

458 of 498 branches covered (91.97%)

Branch coverage included in aggregate %.

1266 of 1329 relevant lines covered (95.26%)

2324.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.31
/Src/FluentAssertions.DataSets/DataColumnAssertions.cs
1
using System;
2
using System.Data;
3
using System.Diagnostics;
4
using FluentAssertions.DataSets.Common;
5
using FluentAssertions.Execution;
6
using FluentAssertions.Primitives;
7

8
namespace FluentAssertions.DataSets;
9

10
/// <summary>
11
/// Provides convenient assertion methods on a <see cref="DataColumn"/> that can be
12
/// used to assert equivalency.
13
/// </summary>
14
[DebuggerNonUserCode]
15
public class DataColumnAssertions : ReferenceTypeAssertions<DataColumn, DataColumnAssertions>
16
{
17
    public DataColumnAssertions(DataColumn dataColumn, AssertionChain assertionChain)
18
        : base(dataColumn, assertionChain)
88✔
19
    {
20
    }
88✔
21

22
    /// <summary>
23
    /// Asserts that an instance of <see cref="DataColumn"/> is equivalent to another.
24
    /// </summary>
25
    /// <remarks>
26
    /// Data columns are equivalent when the following members have the same values:
27
    ///
28
    /// <list type="bullet">
29
    ///   <item><description>AllowDBNull</description></item>
30
    ///   <item><description>AutoIncrement</description></item>
31
    ///   <item><description>AutoIncrementSeed</description></item>
32
    ///   <item><description>AutoIncrementStep</description></item>
33
    ///   <item><description>Caption</description></item>
34
    ///   <item><description>ColumnName</description></item>
35
    ///   <item><description>DataType</description></item>
36
    ///   <item><description>DateTimeMode</description></item>
37
    ///   <item><description>DefaultValue</description></item>
38
    ///   <item><description>Expression</description></item>
39
    ///   <item><description>ExtendedProperties</description></item>
40
    ///   <item><description>MaxLength</description></item>
41
    ///   <item><description>Namespace</description></item>
42
    ///   <item><description>Prefix</description></item>
43
    ///   <item><description>ReadOnly</description></item>
44
    ///   <item><description>Unique</description></item>
45
    /// </list>
46
    /// </remarks>
47
    /// <param name="expectation">A <see cref="DataColumn"/> with the expected configuration.</param>
48
    /// <param name="because">
49
    /// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion
50
    /// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
51
    /// </param>
52
    /// <param name="becauseArgs">
53
    /// Zero or more objects to format using the placeholders in <paramref name="because"/>.
54
    /// </param>
55
    public AndConstraint<DataColumnAssertions> BeEquivalentTo(DataColumn expectation, string because = "",
56
        params object[] becauseArgs)
57
    {
58
        return BeEquivalentTo(
42✔
59
            expectation,
42✔
60
            options => options,
42✔
61
            because,
42✔
62
            becauseArgs);
42✔
63
    }
64

65
    /// <summary>
66
    /// Asserts that an instance of <see cref="DataColumn"/> is equivalent to another.
67
    /// </summary>
68
    /// <remarks>
69
    /// Data columns are equivalent when the following members have the same values:
70
    ///
71
    /// <list type="bullet">
72
    ///   <item><description>AllowDBNull</description></item>
73
    ///   <item><description>AutoIncrement</description></item>
74
    ///   <item><description>AutoIncrementSeed</description></item>
75
    ///   <item><description>AutoIncrementStep</description></item>
76
    ///   <item><description>Caption</description></item>
77
    ///   <item><description>ColumnName</description></item>
78
    ///   <item><description>DataType</description></item>
79
    ///   <item><description>DateTimeMode</description></item>
80
    ///   <item><description>DefaultValue</description></item>
81
    ///   <item><description>Expression</description></item>
82
    ///   <item><description>ExtendedProperties</description></item>
83
    ///   <item><description>MaxLength</description></item>
84
    ///   <item><description>Namespace</description></item>
85
    ///   <item><description>Prefix</description></item>
86
    ///   <item><description>ReadOnly</description></item>
87
    ///   <item><description>Unique</description></item>
88
    /// </list>
89
    ///
90
    /// <para>
91
    /// Testing of any property can be overridden using the <paramref name="config"/> callback. Exclude specific properties using
92
    /// <see cref="IDataEquivalencyAssertionOptions{T}.Excluding(System.Linq.Expressions.Expression{Func{T, object}})"/>.
93
    /// </para>
94
    /// <para>
95
    /// If <see cref="IDataEquivalencyAssertionOptions{T}.ExcludingColumn(DataColumn)"/> or a related function is
96
    /// used and the exclusion matches the subject <see cref="DataColumn"/>, then the equivalency test will never
97
    /// fail.
98
    /// </para>
99
    /// </remarks>
100
    /// <param name="expectation">A <see cref="DataColumn"/> with the expected configuration.</param>
101
    /// <param name="config">
102
    /// A reference to the <see cref="IDataEquivalencyAssertionOptions{DataColumn}"/> configuration object that can be used
103
    /// to influence the way the object graphs are compared. You can also provide an alternative instance of the
104
    /// <see cref="IDataEquivalencyAssertionOptions{DataColumn}"/> class. The global defaults are determined by the
105
    /// <see cref="AssertionConfiguration"/> class.
106
    /// </param>
107
    /// <param name="because">
108
    /// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion
109
    /// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
110
    /// </param>
111
    /// <param name="becauseArgs">
112
    /// Zero or more objects to format using the placeholders in <paramref name="because"/>.
113
    /// </param>
114
    /// <exception cref="ArgumentNullException"><paramref name="config"/> is <see langword="null"/>.</exception>
115
    public AndConstraint<DataColumnAssertions> BeEquivalentTo(DataColumn expectation,
116
        Func<IDataEquivalencyAssertionOptions<DataColumn>, IDataEquivalencyAssertionOptions<DataColumn>> config,
117
        string because = "", params object[] becauseArgs)
118
    {
119
        Guard.ThrowIfArgumentIsNull(config);
88✔
120

121
        var defaults = new DataEquivalencyAssertionOptions<DataColumn>(AssertionConfiguration.Current.Equivalency.CloneDefaults<DataColumn>());
88✔
122
        config(defaults);
88✔
123

124
        ((object)Subject).Should().BeEquivalentTo(expectation, _ => defaults, because, becauseArgs);
176✔
125

126
        return new AndConstraint<DataColumnAssertions>(this);
48✔
127
    }
128

129
    protected override string Identifier => "DataColumn";
×
130
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc