예제 #1
0
                public async Task WhenCalled_SetsCreated()
                {
                    var helper = new FakeUserHelper1();
                    var user   = new User();

                    await helper.SetCreated(user);

                    Assert.Equal(helper.FakeClock.UtcNow, user.Created);
                }
예제 #2
0
                public async Task NullUser_Throws()
                {
                    var helper = new FakeUserHelper1();

                    await Assert.ThrowsAsync <ArgumentNullException>("user", async() =>
                    {
                        await helper.SetCreated <User>(user: null);
                    });
                }