public void Index_NegativeIndex_ReturnsExpected(int[] items, int index, int expected) { var list = new BroadcastList <int>(items); var actual = list[index]; Assert.AreEqual(expected, actual); }
} // GetMappedServices protected MappedService GetMappedService(BroadcastList item, UiBroadcastService service, IDictionary <string, MappedService> mappedServices, IDictionary <string, ServiceLogoMappings.ReplacementDomain> domainMappings) { MappedService mappedService; var domain = item.Provider.DomainName; while (domain != null) { ServiceLogoMappings.ReplacementDomain replacement; var key = MappedService.GetKey(service.ServiceName, domain); if (mappedServices.TryGetValue(key, out mappedService)) { return(mappedService); } // if if (!domainMappings.TryGetValue(domain.ToLowerInvariant(), out replacement)) { return(null); } // if domain = replacement.Replacement; } // while return(null); } // GetMappedService
public void Add_AsExpected(int[] items, int[] expected) { var list = new BroadcastList <int>(); foreach (var item in items) { list.Add(item); } CollectionAssert.AreEqual(expected, list); }
internal Player() { Hub = GetComponent <ReferenceHub>(); Scp106Controller = new Scp106Controller(this); Scp079Controller = new Scp079Controller(this); Scp096Controller = new Scp096Controller(this); Scp173Controller = new Scp173Controller(this); Jail = new Jail(this); ActiveBroadcasts = new BroadcastList(this); Inventory = new PlayerInventory(this); GrenadeManager = GetComponent <Grenades.GrenadeManager>(); GameConsoleTransmission = this.GetComponent <GameConsoleTransmission>(); MicroHID = GetComponent <MicroHID>(); }
internal Player() { Hub = GetComponent <ReferenceHub>(); Scp106Controller = new Scp106Controller(this); Scp079Controller = new Scp079Controller(this); Scp096Controller = new Scp096Controller(this); Scp173Controller = new Scp173Controller(); Jail = new Jail(this); ActiveBroadcasts = new BroadcastList(this); Inventory = new PlayerInventory(this); GameConsoleTransmission = GetComponent <GameConsoleTransmission>(); DissonanceUserSetup = GetComponent <Assets._Scripts.Dissonance.DissonanceUserSetup>(); Radio = GetComponent <Radio>(); Escape = GetComponent <Escape>(); AmmoBox = new PlayerAmmoBox(this); }