public async Task CreateSubcriptionConfigurationSuccessfully() { //create a subscription..standard string subscriptionName = "Standard"; var subcriptionId = await SubcriptionFactory.Create(subscriptionName, true); Assert.AreNotEqual(subcriptionId, Guid.Empty); var subscription = await SubcriptionFactory.GetById(subcriptionId); Assert.AreEqual(subscriptionName, subscription.Name); //create a configuration.. transcript string configurationName = "Transcript"; var configurationId = await ConfigurationFactory.Create(configurationName, true); Assert.AreNotEqual(configurationId, Guid.Empty); var configuration = await ConfigurationFactory.GetById(configurationId); Assert.AreEqual(configurationName, configuration.Name); //create a subcription configuration.. transcript in stanadard var subcriptionConfigurationId = await SubcriptionConfigurationFactory.Create(subcriptionId, configurationId, true); Assert.AreNotEqual(subcriptionConfigurationId, Guid.Empty); }
public async Task CreateSubscriptionSuccessfully() { string subscriptionName = "professional"; var id = await SubcriptionFactory.Create(subscriptionName, true); Assert.AreNotEqual(id, Guid.Empty); var subscription = await SubcriptionFactory.GetById(id); Assert.AreEqual(subscriptionName, subscription.Name); }
public async Task CreatCustomerSubscriptionsConfigurationsuccessfully() { //create a subscription..standard2 string subscriptionName = "Standard2"; var subcriptionId = await SubcriptionFactory.Create(subscriptionName, true); Assert.AreNotEqual(subcriptionId, Guid.Empty); var subscription = await SubcriptionFactory.GetById(subcriptionId); Assert.AreEqual(subscriptionName, subscription.Name); //create a user subscription..with ApiKey var userSubscriptionId = await UserSubscriptionFactory.Create(ApiKeyHelper.CreateApiKey(), subcriptionId, Guid.NewGuid()); Assert.AreNotEqual(userSubscriptionId, Guid.Empty); //create a configuration string configurationName = "Downloadable1"; var configurationId = await ConfigurationFactory.Create(configurationName, true); Assert.AreNotEqual(configurationId, Guid.Empty); var configuration = await ConfigurationFactory.GetById(configurationId); Assert.AreEqual(configurationName, configuration.Name); //create a customer subscription configuration.. var id = await CustomerSubscriptionsConfigurationsFactory.Create(configurationId, userSubscriptionId, false); Assert.AreNotEqual(id, Guid.Empty); var detailcustomer = await CustomerSubscriptionsConfigurationsFactory.GetById(id); Assert.AreEqual(configurationId, detailcustomer.ConfigurationId); Assert.AreEqual(false, detailcustomer.Enabled); //check logging of event also var eventlogs = await EventLogFactory.GetList(); var logEntry = eventlogs.Where(log => log.EntityId == id).FirstOrDefault(); Assert.IsNotNull(logEntry); }
public async Task CreateUserSubscriptionSuccessfully() { //create a subscription..standard1 string subscriptionName = "Standard1"; var subcriptionId = await SubcriptionFactory.Create(subscriptionName, true); Assert.AreNotEqual(subcriptionId, Guid.Empty); var subscription = await SubcriptionFactory.GetById(subcriptionId); Assert.AreEqual(subscriptionName, subscription.Name); //create a user subscription..with ApiKey var id = UserSubscriptionFactory.Create(ApiKeyHelper.CreateApiKey(), subcriptionId, Guid.NewGuid()); Assert.AreNotEqual(id, Guid.Empty); }