public void ForCpu_DoNotChangeWhenValueChanges() { var provider = new IdProvider(); var cpu = Generators.CreateNewCpuModel().ToDto(); var original = provider.GetForCpu(cpu); Assert.AreEqual(original, provider.GetForCpu(cpu)); cpu.Caches = new List <CpuCacheDto>(); Assert.AreEqual(original, provider.GetForCpu(cpu)); cpu.Frequency = cpu.Frequency + 1; Assert.AreEqual(original, provider.GetForCpu(cpu)); cpu.Smt = !cpu.Smt; Assert.AreEqual(original, provider.GetForCpu(cpu)); cpu.Features = new List <string>(); Assert.AreEqual(original, provider.GetForCpu(cpu)); }
public void ForCpu_Success() { var provider = new IdProvider(); var cpu = Generators.CreateNewCpuModel().ToDto(); Assert.AreEqual($"{cpu.Vendor}_{cpu.Brand}_{string.Join("_", cpu.AdditionalInfo.Values)}", provider.GetForCpu(cpu)); }