1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using Microsoft.VisualStudio.TestTools.UnitTesting;
- using XYY.Service.Standard.Order;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Microsoft.Extensions.DependencyInjection;
- using XYY.TaskTrack.Standard;
- namespace XYY.Service.Standard.Order.Tests
- {
- [TestClass()]
- public class CancelOrderJobSubscribeTests
- {
- ICancelOrderJobSubscribe _consumer = null;
- public CancelOrderJobSubscribeTests()
- {
- var services = new ServiceCollection();
- services.AddTransient<ICancelOrderJobSubscribe, CancelOrderJobSubscribe>();
- services.AddTransient<IMQManager, MQManager>();
- var serviceProvider = services.BuildServiceProvider();
- _consumer = serviceProvider.GetService<ICancelOrderJobSubscribe>();
-
- }
- [TestMethod()]
- public void ConsumeTest()
- {
- var msg = new CancelOrderJobMessage
- {
- CreateTime = DateTime.Now,
- SysmteNos = new List<string> { "XYYEX0020647589YQ" },
- UserId = 164,
- UserName = "admin"
- };
- _consumer.Consume(msg);
- Assert.Fail();
- }
- }
- }
|