Esempio n. 1
0
            private Task <Organization> InvokeAddOrganization(string orgName = OrgName, string orgEmail = OrgEmail, User admin = null)
            {
                // Arrange
                admin = admin ?? new User(AdminName)
                {
                    Credentials = new Credential[] {
                        new CredentialBuilder().CreateExternalCredential(
                            issuer: "AzureActiveDirectory",
                            value: "abc123",
                            identity: "Admin",
                            tenantId: "zyx987")
                    }
                };

                _service.MockDateTimeProvider
                .Setup(x => x.UtcNow)
                .Returns(OrgCreatedUtc);

                // Act
                return(_service.AddOrganizationAsync(orgName, orgEmail, admin));
            }