For some reason, testing this method GetById causes problems. I hope for your help. (C #)

 public class ProductTypes: Archetypes<ProductType> { public static ProductTypes Instance { get; } = new ProductTypes(); public static ProductType GetById(string uniqueId) { return Instance.Find(x=> x.IsThisUniqueId(uniqueId)); } public static ProductTypes GetInherited(string uniqueId) { var t = new ProductTypes(); var l = Instance.FindAll(x => x.TypeId == uniqueId); t.AddRange(l); return t; } } 
  • 3
    Welcome to StackOverflow! You may consider people answering questions here as wizards. However, our magic is not strong enough to guess what you mean by the word "problems". - Igor
  • I do not know how to do .. - lisa
  • Well, let's go on the other side. What do you do not like the code shown? - Igor
  • Everyone is satisfied) you need to do its unit testing. - lisa
  • What is the problem? if there is an error during the test, which one? The reason most likely to look for in Instance.Find(...) . Archetypes<T> is completely covered with tests? do they pass? - rdorn

0