コード例 #1
0
            public void StringEquality()
            {
                PropertyName first  = "Name";
                PropertyName second = "Name";

                first.Should().Be(second);
            }
コード例 #2
0
            public void PropertyInfoInequality()
            {
                PropertyName first  = typeof(Project).GetProperty(nameof(Project.Name));
                PropertyName second = typeof(Project).GetProperty(nameof(Project.NumberOfCommits));

                first.Should().NotBe(second);
            }
コード例 #3
0
            public void PropertyInfoEquality()
            {
                PropertyName first  = typeof(Project).GetProperty(nameof(Project.Name));
                PropertyName second = typeof(Project).GetProperty(nameof(Project.Name));

                first.Should().Be(second);
            }
コード例 #4
0
            public void ExpressionEqualityWithDifferentParameters()
            {
                PropertyName first  = Property <Project>(p => p.Name);
                PropertyName second = Property <Project>(project => project.Name);

                first.Should().Be(second);
            }
コード例 #5
0
            public void ExpressionEquality()
            {
                PropertyName first  = Property <Project>(p => p.Name);
                PropertyName second = Property <Project>(p => p.Name);

                first.Should().Be(second);
            }
コード例 #6
0
 public void AssertFired(string propertyName)
 {
     _args.Should().NotBeNull(
         "we expect the event to have been fired.");
     _args !.PropertyName.Should().Be(
         propertyName,
         $"we expect the event to have been fired for '{propertyName}.");
 }