public async Task Alias_IndexPostWithNeitherPasswordNorEmail_BadRequest()
        {
            using (IdentityWsDbContext ef = CreateEf()) {
                ef.Aliases.Add(new Alias {
                    EmailAddress = "*****@*****.**"
                });
                await ef.SaveChangesAsync();

                AliasesController patient = new AliasesController(ef, dummyLog, now, dummyRunner);

                AliasesController.IndexPostRequestBody body = new AliasesController.IndexPostRequestBody();
                IActionResult result = await patient.IndexPost("*****@*****.**", body);

                result.Should().BeOfType <BadRequestResult>($"exactly one of '{nameof(body.otherEmailAddress)}' or '{nameof(body.password)} is required'");
            }
        }
        public async Task Alias_IndexPostWithWrongOtherEmail_NotFound()
        {
            using (IdentityWsDbContext ef = CreateEf()) {
                ef.Aliases.Add(new Alias
                {
                    EmailAddress = "*****@*****.**"
                });
                await ef.SaveChangesAsync();

                AliasesController patient = new AliasesController(ef, dummyLog, now, dummyRunner);

                AliasesController.IndexPostRequestBody body = new AliasesController.IndexPostRequestBody
                {
                    otherEmailAddress = "*****@*****.**"
                };
                IActionResult result = await patient.IndexPost("*****@*****.**", body);

                result.Should().BeOfType <NotFoundResult>($"the '{nameof(body.otherEmailAddress)}' does not exist");
            }
        }
        public async Task Alias_IndexPostWithOtherEmail_NoContentWithNewAliasAndLinkedBeing()
        {
            using (IdentityWsDbContext ef = CreateEf()) {
                ef.Aliases.Add(new Alias
                {
                    EmailAddress = "*****@*****.**",
                    Being        = new Being()
                });
                await ef.SaveChangesAsync();

                AliasesController patient = new AliasesController(ef, dummyLog, now, dummyRunner);

                AliasesController.IndexPostRequestBody body = new AliasesController.IndexPostRequestBody
                {
                    otherEmailAddress = "*****@*****.**"
                };
                IActionResult result = await patient.IndexPost("*****@*****.**", body);

                result.Should().BeOfType <NoContentResult>("an existing email address (only) was supplied");
                ef.Aliases.Include(a => a.Being).Should().Contain(a => a.EmailAddress == "*****@*****.**", "a new alias should have been created")
                .Which.Being.Aliases.Should().HaveCount(2, "the new alias should have been linked to the existing being");
            }
        }