public void WebAPI_DomainServiceGetFromMongo_Test() { DomainsService ds = new DomainsService(); List <Domain> dmns = ds.GetFromMongo(5, "TestSource"); Assert.AreEqual(10, dmns.Count); }
public void WebAPI_DomainServiceGet_Test() { DomainsService ds = new DomainsService(); List <Domain> dmns = ds.Get(10); Assert.AreEqual(10, dmns.Count); }
public DomainEditorDialogViewModel( DomainPropertyService domainPropertyService, DomainsService domainsService) { _domains = domainsService; _domainPropertyService = domainPropertyService; }
public MockDnsimpleClient(string fixture) { Fixture = fixture; Accounts = new AccountsService(this); Domains = new DomainsService(this); Http = new MockHttpService("v2", Fixture, BaseUrl); Identity = new IdentityService(this); OAuth = new OAuth2Service(Http); Registrar = new RegistrarService(this); Zones = new ZonesService(this); }
/// <summary> /// Initializes all the services offered by the current version of /// this API. /// </summary> /// <see cref="IdentityService"/> /// <see cref="HttpService"/> /// <see cref="OAuth2Service"/> private void InitializeServices() { Accounts = new AccountsService(this); Certificates = new CertificatesService(this); Domains = new DomainsService(this); Http = new HttpService(RestClientWrapper.RestClient, new RequestBuilder()); Identity = new IdentityService(this); OAuth = new OAuth2Service(Http); Registrar = new RegistrarService(this); Tlds = new TldsService(this); Zones = new ZonesService(this); }
private DomainsService GetInMemoryDomainsService() { DbContextOptions <AppDbContext> options; var builder = new DbContextOptionsBuilder <AppDbContext>(); builder.UseInMemoryDatabase("domains-test"); options = builder.Options; var db = new AppDbContext(options); db.Database.EnsureDeleted(); db.Database.EnsureCreated(); var properties = new DomainPropertyService(db); var domains = new DomainsService(db, properties); return(domains); }
/// <summary> /// Initializes all the services offered by the current version of /// this API. /// </summary> /// <see cref="IdentityService"/> /// <see cref="HttpService"/> /// <see cref="OAuth2Service"/> private void InitializeServices() { Http = new HttpService(RestClientWrapper.RestClient, new RequestBuilder()); Accounts = new AccountsService(this); Certificates = new CertificatesService(this); Contacts = new ContactsService(this); Domains = new DomainsService(this); Identity = new IdentityService(this); OAuth = new OAuth2Service(Http); Registrar = new RegistrarService(this); Services = new ServicesService(this); Tlds = new TldsService(this); Templates = new TemplatesService(this); VanityNameServers = new VanityNameServersService(this); Webhooks = new WebhooksService(this); Zones = new ZonesService(this); }
public MockDnsimpleClient(string fixture) { Fixture = fixture; UserAgent = "Testing user agent"; Accounts = new AccountsService(this); Certificates = new CertificatesService(this); Contacts = new ContactsService(this); Domains = new DomainsService(this); Http = new MockHttpService("v2", Fixture, BaseUrl); Identity = new IdentityService(this); OAuth = new OAuth2Service(Http); Registrar = new RegistrarService(this); Services = new ServicesService(this); Tlds = new TldsService(this); Templates = new TemplatesService(this); VanityNameServers = new VanityNameServersService(this); Webhooks = new WebhooksService(this); Zones = new ZonesService(this); }
public DomainsServiceTests() { service = new DomainsService(db); }
public DomainsViewerViewModel(DomainsService domainsService, IDialogService dialogService) { _domains = domainsService; _dialogService = dialogService; }