BrightstarDB.Models.EventFeedTests.ServiceTests.TestRegisterInterest C# (CSharp) Метод

TestRegisterInterest() приватный Метод

private TestRegisterInterest ( ) : void
Результат void
        public void TestRegisterInterest()
        {
            var storeId = Guid.NewGuid().ToString();
            var eventService = new EventFeedService(storeId);

            // create a topic first that can be subscribed to, this topic could have been 'found' by search or be
            // a well known topic.
            eventService.AssertTopic(new Uri("http://www.brightstardb.com/topics/34"), "Topic 34", "A very important topic");
            eventService.AssertTopic(new Uri("http://www.brightstardb.com/topics/33"), "Topic 33", "A very important topic");

            eventService.AssertSubscriber("domain\\bob", new List<Uri>() { new Uri("http://www.brightstardb.com/topics/34") });
            eventService.RaiseEvent("Bob created document Y", DateTime.UtcNow, new List<string>() { "http://www.brightstardb.com/topics/33" });

            eventService.RegisterInterest("domain\\bob", "http://www.brightstardb.com/topics/33");
            eventService.RaiseEvent("Bob created document Y", DateTime.UtcNow, new List<string>() { "http://www.brightstardb.com/topics/33" });

            var events = eventService.GetSubscriberTimeline("domain\\bob", DateTime.MinValue);
            Assert.AreEqual(1, events.Count());
        }