public void Get_should_produce_correct_message_type() { var pool = new MessagePoolMulti(); IMessage d = pool.Get(typeof(DummyMessage)); Assert.AreEqual(typeof(DummyMessage), d.GetType()); }
public void Get_should_produce_different_message_types() { var pool = new MessagePoolMulti(); IMessage d = pool.Get(typeof(DummyMessage)); IMessage a = pool.Get(typeof(AltDummyMessage)); Assert.AreNotEqual(d.GetType(), a.GetType()); }
public void Get_mixed_inverse_should_produce_different_messages() { var pool = new MessagePoolMulti(); IMessage d = pool.Get(typeof(DummyMessage)); IMessage q = pool.Get <DummyMessage>(); Assert.AreNotEqual(d, q); }
public void Get_generic_should_produce_different_messages() { var pool = new MessagePoolMulti(); IMessage d = pool.Get <DummyMessage>(); IMessage q = pool.Get <DummyMessage>(); Assert.AreNotEqual(d, q); }
public void Get_mixed_inverse_should_produce_same_message() { var pool = new MessagePoolMulti(); IMessage d = pool.Get(typeof(DummyMessage)); d.Sent(); IMessage q = pool.Get <DummyMessage>(); Assert.AreEqual(d, q); }
public void Get_generic_should_produce_same_message() { var pool = new MessagePoolMulti(); IMessage d = pool.Get <DummyMessage>(); d.Sent(); IMessage q = pool.Get <DummyMessage>(); Assert.AreEqual(d, q); }