Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 public void IssueClosed(TenantId Tenant, ProductId Product, IssueId Id)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public bool IsActive(TenantId tenant, ProductId product, IssueId issue)
 {
     return(Issues.Any(x => x.Id == issue));
 }
Exemplo n.º 6
0
 public IssueView GetById(TenantId Tenant, ProductId Product, IssueId TicketId)
 {
     return(Issues.FirstOrDefault(x => x.Id == TicketId));
 }
Exemplo n.º 7
0
 public bool ProductExists(TenantId TenantId, ProductId Id)
 {
     return RegisteredProducts.Any(x => x.TenantId == TenantId && x.Id == Id);
 }
Exemplo n.º 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 });
 }
Exemplo n.º 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);
 }
Exemplo n.º 10
0
 public void IssueClosed(TenantId Tenant, ProductId Product, IssueId Id)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 11
0
 public bool IsActive(TenantId tenant, ProductId product, IssueId issue)
 {
     return Issues.Any(x => x.Id == issue);
 }
Exemplo n.º 12
0
 public IssueView GetById(TenantId Tenant, ProductId Product, IssueId TicketId)
 {
     return Issues.FirstOrDefault(x => x.Id == TicketId);
 }
Exemplo n.º 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));
 }
Exemplo n.º 14
0
 public bool ProductExists(TenantId TenantId, ProductId Id)
 {
     return(RegisteredProducts.Any(x => x.TenantId == TenantId && x.Id == Id));
 }
Exemplo n.º 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
     });
 }