コード例 #1
0
        public static void ClearTenantConfig(this ICakeContext context, ClearTenantArgs args)
        {
            DependencyConfig.Setup(args, context).GetAwaiter().GetResult();
            var cmd = DependencyConfig.Container.GetService <ClearTenantCommand>();

            cmd.Execute().GetAwaiter().GetResult();
        }
コード例 #2
0
 public TenantClearer(ClearTenantArgs args, IOctopusAsyncRepository octopusRepository)
 {
     _args = args ?? throw new ArgumentNullException(nameof(args));
     _octopusRepository = octopusRepository ?? throw new ArgumentNullException(nameof(octopusRepository));
 }
コード例 #3
0
        public async Task ClearTenantArgsAddedAndSubTypes(Mock <IServiceCollection> mockColl, ClearTenantArgs args)
        {
            await DependencyConfig.Setup(args, null, mockColl.Object, false).ConfigureAwait(false);

            mockColl.Verify(m => m.Add(It.Is <ServiceDescriptor>(s => s.ServiceType == typeof(ClearTenantArgs))), Times.Once);
            mockColl.Verify(m => m.Add(It.Is <ServiceDescriptor>(s => s.ServiceType == typeof(ArgsBase))), Times.Once);
        }