BuffManagerTest.cs 562 B

123456789101112131415161718192021222324252627282930313233
  1. using Component;
  2. using Microsoft.VisualStudio.TestTools.UnitTesting;
  3. namespace WorldTest
  4. {
  5. [TestClass]
  6. public class BuffManagerTest
  7. {
  8. private TestContext testContextInstance;
  9. public TestContext TestContext
  10. {
  11. get
  12. {
  13. return testContextInstance;
  14. }
  15. set
  16. {
  17. testContextInstance = value;
  18. }
  19. }
  20. [TestMethod]
  21. public void TestAdd()
  22. {
  23. var buffManager = new BuffManager();
  24. var buff = new Buff { Type = 1 };
  25. buffManager.Add(buff);
  26. var getBuff = buffManager.GetById(buff.Id);
  27. Assert.AreSame(buff, getBuff);
  28. }
  29. }
  30. }