Exemplo n.º 1
0
        public void TestMethod1()
        {
            var id  = Guid.NewGuid();
            var bid = Guid.NewGuid();
            var sys = new SystemNoErrors();

            var store = new InMemoryStore.Store(id, bid);
            var op    = new Sample.Operation(store, sys, new Request {
            });

            testOperation(op);



            var info = store.GetInfo();

            Assert.IsNotNull(info);
            Assert.IsNotNull(info.Actions);
            Assert.AreEqual(info.Actions.Count, 4);

            Assert.AreEqual(info.Status, InMemoryStore.Store.opStatus.completed);
            var ainfo0 = info.Actions.FirstOrDefault(a => a.Order == 0);
            var ainfo1 = info.Actions.FirstOrDefault(a => a.Order == 1);
            var ainfo2 = info.Actions.FirstOrDefault(a => a.Order == 2);
            var ainfo3 = info.Actions.FirstOrDefault(a => a.Order == 3);

            Assert.IsTrue(ainfo0.IsLast && ainfo1.IsLast && ainfo2.IsLast && ainfo3.IsLast);
        }
Exemplo n.º 2
0
        public void TestMethod1()
        {
            var id = Guid.NewGuid();
            var bid = Guid.NewGuid();
            var sys = new SystemNoErrors();

            var store = new InMemoryStore.Store(id, bid);
            var op = new Sample.Operation(store, sys, new Request { });
            testOperation(op);



            var info = store.GetInfo();
            Assert.IsNotNull(info);
            Assert.IsNotNull(info.Actions);
            Assert.AreEqual(info.Actions.Count, 4);

            Assert.AreEqual(info.Status, InMemoryStore.Store.opStatus.completed);
            var ainfo0 = info.Actions.FirstOrDefault(a => a.Order == 0);
            var ainfo1 = info.Actions.FirstOrDefault(a => a.Order == 1);
            var ainfo2 = info.Actions.FirstOrDefault(a => a.Order == 2);
            var ainfo3 = info.Actions.FirstOrDefault(a => a.Order == 3);
            Assert.IsTrue( ainfo0.IsLast && ainfo1.IsLast && ainfo2.IsLast && ainfo3.IsLast);
        }