-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubscribeEngine.Tests.cs
35 lines (34 loc) · 1.08 KB
/
SubscribeEngine.Tests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using Coflnet.Sky.Core;
using Coflnet.Sky.Subscriptions.Models;
using Moq;
using NUnit.Framework;
namespace Coflnet.Sky.Subscriptions
{
public class SubscribeEngineTests
{
[Test]
public void BasicMatch()
{
var notifi = new Mock<INotificationService>();
//notifi.Setup(n => n.AuctionPriceAlert(It.IsAny<Subscription>(), "ASPECT", 5));
var engine = new SubscribeEngine(null, notifi.Object, null, null);
var sub = new Subscription()
{
Price = 1,
Type = Subscription.SubType.BIN | Subscription.SubType.PriceHigherThan,
TopicId = "ASPECT"
};
var auction = new SaveAuction()
{
StartingBid = 5,
Tag = "ASPECT",
Start = System.DateTime.Now,
AuctioneerId = "",
Bin = true
};
engine.AddNew(sub);
engine.NewAuction(auction);
notifi.Verify(n => n.AuctionPriceAlert(sub, auction), Times.Once);
}
}
}