public void Test_GetComponentGeneric_Non_existing_component() { DictionaryComponent dictionary = new DictionaryComponent(); var thisComponent = dictionary.GetComponent <StubComponent>(); Assert.IsNull(thisComponent); }
public void Test_RemoveComponent() { DictionaryComponent dictionary = new DictionaryComponent(); IComponent component = new StubComponent(); dictionary.Remove(component); var thisComponent = dictionary.GetComponent <StubComponent>(); Assert.AreNotSame(thisComponent, component); }
public void Test_GetComponentByString() { DictionaryComponent dictionary = new DictionaryComponent(); IComponent component = new StubComponent(); dictionary.Add(component); var thisComponent = dictionary.GetComponent("StubComponent"); Assert.AreSame(component, thisComponent); }
public void Test_GetComponentGeneric() { DictionaryComponent dictionary = new DictionaryComponent(); IComponent component = new StubComponent(); dictionary.Add(component); var thisComponent = dictionary.GetComponent <StubComponent>(); Assert.AreSame(component, thisComponent); }
public void Test_GetComponent() { DictionaryComponent dictionary = new DictionaryComponent(); IComponent component = new StubComponent(); dictionary.Add(component); // не обрабатывавает имключение, если такого компонента нет в словаре var thisComponent = dictionary.GetComponent(typeof(StubComponent)); Assert.AreSame(component, thisComponent); }
public void Test_GetComponentByString_Non_existing_component() { DictionaryComponent dictionary = new DictionaryComponent(); var thisComponent = dictionary.GetComponent("StubComponent"); }