Beispiel #1
0
 public bool IsActive(TenantId TenantId, ProductId ProductId = null)
 {
     if (!ActiveTenants.Contains(TenantId)) return false;
     if (ProductId == null) return true;
     var prod = GetById(TenantId,ProductId);
     return (prod != null);
 }
Beispiel #2
0
 public void IssueRegistered(TenantId Tenant, ProductId Product, IssueId Id, string Name, string Description, IssueType Type, IssueAssignerId assigner)
 {
     Issues.Add(new IssueView { Id = Id, Name = Name, Description = Description, Assigner = assigner });
     if (Type == IssueType.Defect)
         Bus.DefectReported(Tenant, Product, Id, Name, Description, assigner);
     else
         Bus.FeatureRequested(Tenant, Product, Id, Name, Description, assigner);
 }
 public void Get_a_product_by_id_that_does_not_exist()
 {
     var a_non_existing_product = new ProductId(Guid.NewGuid());
     var result = SUT.GetById(a_tenant_id,a_non_existing_product);
     result.ShouldBe(null);
 }
Beispiel #4
0
 public void IssueClosed(TenantId Tenant, ProductId Product, IssueId Id)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public bool IsActive(TenantId tenant, ProductId product, IssueId issue)
 {
     return(Issues.Any(x => x.Id == issue));
 }
Beispiel #6
0
 public IssueView GetById(TenantId Tenant, ProductId Product, IssueId TicketId)
 {
     return(Issues.FirstOrDefault(x => x.Id == TicketId));
 }
Beispiel #7
0
 public bool ProductExists(TenantId TenantId, ProductId Id)
 {
     return RegisteredProducts.Any(x => x.TenantId == TenantId && x.Id == Id);
 }
Beispiel #8
0
 public void ProductActivated(TenantId TenantId, ProductId Id, string a_product_name, string a_product_description)
 {
     RegisteredProducts.Add(new ProductView { Id = Id, TenantId = TenantId });
 }
Beispiel #9
0
 public ProductView GetById(TenantId a_tenant_id, ProductId a_product_id)
 {
     return this.RegisteredProducts.FirstOrDefault(x=>x.TenantId == a_tenant_id && x.Id == a_product_id);
 }
Beispiel #10
0
 public void IssueClosed(TenantId Tenant, ProductId Product, IssueId Id)
 {
     throw new NotImplementedException();
 }
Beispiel #11
0
 public bool IsActive(TenantId tenant, ProductId product, IssueId issue)
 {
     return Issues.Any(x => x.Id == issue);
 }
Beispiel #12
0
 public IssueView GetById(TenantId Tenant, ProductId Product, IssueId TicketId)
 {
     return Issues.FirstOrDefault(x => x.Id == TicketId);
 }
Beispiel #13
0
 public ProductView GetById(TenantId a_tenant_id, ProductId a_product_id)
 {
     return(this.RegisteredProducts.FirstOrDefault(x => x.TenantId == a_tenant_id && x.Id == a_product_id));
 }
Beispiel #14
0
 public bool ProductExists(TenantId TenantId, ProductId Id)
 {
     return(RegisteredProducts.Any(x => x.TenantId == TenantId && x.Id == Id));
 }
Beispiel #15
0
 public void ProductActivated(TenantId TenantId, ProductId Id, string a_product_name, string a_product_description)
 {
     RegisteredProducts.Add(new ProductView {
         Id = Id, TenantId = TenantId
     });
 }