• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

samsmithnz / SatisfactoryTree / 17365514447

01 Sep 2025 01:56AM UTC coverage: 39.13% (+2.6%) from 36.569%
17365514447

push

github

web-flow
Merge pull request #268 from samsmithnz/copilot/fix-263

Implement production planning system for specific products in Satisfactory WinForms app

466 of 631 branches covered (73.85%)

Branch coverage included in aggregate %.

159 of 180 new or added lines in 4 files covered. (88.33%)

1235 of 3716 relevant lines covered (33.23%)

2553.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

88.37
/src/SatisfactoryTree/Models/Storage.cs
1
namespace SatisfactoryTree.Models
2
{
3
    public class Storage
4
    {
5
        public Storage(string factoryId = "default")
15✔
6
        {
15✔
7
            FactoryId = factoryId;
15✔
8
            Items = new Dictionary<string, decimal>();
15✔
9
        }
15✔
10

11
        public string FactoryId { get; set; }
15✔
12
        public Dictionary<string, decimal> Items { get; set; }
65✔
13

14
        public void AddItem(string itemName, decimal quantity)
15
        {
10✔
16
            if (Items.ContainsKey(itemName))
10✔
17
            {
1✔
18
                Items[itemName] += quantity;
1✔
19
            }
1✔
20
            else
21
            {
9✔
22
                Items[itemName] = quantity;
9✔
23
            }
9✔
24
        }
10✔
25

26
        public bool RemoveItem(string itemName, decimal quantity)
27
        {
3✔
28
            if (Items.ContainsKey(itemName) && Items[itemName] >= quantity)
3!
29
            {
2✔
30
                Items[itemName] -= quantity;
2✔
31
                if (Items[itemName] == 0)
2!
NEW
32
                {
×
NEW
33
                    Items.Remove(itemName);
×
NEW
34
                }
×
35
                return true;
2✔
36
            }
37
            return false;
1✔
38
        }
3✔
39

40
        public decimal GetItemQuantity(string itemName)
41
        {
9✔
42
            return Items.ContainsKey(itemName) ? Items[itemName] : 0;
9✔
43
        }
9✔
44

45
        public List<KeyValuePair<string, decimal>> GetAllItems()
46
        {
3✔
47
            return Items.ToList();
3✔
48
        }
3✔
49
    }
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc