BuffManagerTest.cs 614 B

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