コード例 #1
0
 private EmailExpectation SetupEmailExpectation(
     IDisposableEntity <ApplicationUser> user,
     IDisposableEntity <EventInfo> evt)
 {
     return(_factory.EmailSenderMock
            .ExpectEmail()
            .SentTo(user.Entity.Email)
            .WithSubject($"Kursbevis for {evt.Entity.Title}")
            .ContainingHtml("Her er kursbeviset! Gratulere!")
            .HavingAttachment()
            .Setup());
 }
コード例 #2
0
        public static async Task CheckSettingReturnedAsync(this HttpClient client,
                                                           IDisposableEntity <Organization> org,
                                                           string name,
                                                           string value)
        {
            var response = await client
                           .GetAsync($"/v3/organizations/{org.Entity.OrganizationId}/settings");

            var arr = await response.CheckOk().AsArrayAsync();

            Assert.Contains(arr, t => t.Value <string>("name") == name &&
                            t.Value <string>("value") == value);
        }