Esempio n. 1
0
         public void MyTestInitialize() 
         {
             probeResultFactory = new ProbeResultFactory();
             dataprovider = new LocalDataProvider();
             MockRepository mocks = new MockRepository();

             provider = mocks.StrictMock<IDataProvider>();
             Expect.Call(provider.GetSession()).Repeat.Any().Return(dataprovider.GetSession());                                       
             mocks.ReplayAll();

         }
Esempio n. 2
0
 public void Should_be_possible_to_get_CollectResultDTO_from_CollectResult()
 {
     LocalDataProvider provider = new LocalDataProvider();
     var fakeSession = provider.GetSession();
     CollectRequest collectRequest = new CollectRequestFactory().CreateCollectRequestCompleteAfterCollect(fakeSession);
     fakeSession.SaveChanges();
     CollectResultAssembler assembler = new CollectResultAssembler();
     var collectResult = assembler.CreateDTOFromCollectResult(fakeSession, collectRequest);
     Assert.IsNotNull(collectResult);
     Assert.IsNotNull(collectResult.Date);
     Assert.IsNotNull(collectResult.SystemCharacteristics);
 }
 private IEnumerable<CollectExecutionLog> GetExecutionLogs()
 {
     LocalDataProvider provider = new LocalDataProvider();
     IDocumentSession fakeSession = provider.GetSession();
     CollectRequest collectRequest = new CollectRequestFactory().CreateCollectRequestCompleteAfterCollect(fakeSession);
     fakeSession.SaveChanges();
     IEnumerable<CollectExecutionLog> executionLogs = collectRequest.GetExecutionLog(fakeSession);
     return executionLogs;
 }
Esempio n. 4
0
        public void Should_be_possible_to_get_A_compressed_execution_Log_from_CollectResult()
        {
            LocalDataProvider provider = new LocalDataProvider();
            var fakeSession = provider.GetSession();
            CollectRequest collectRequest = new CollectRequestFactory().CreateCollectRequestCompleteAfterCollect(fakeSession);
            fakeSession.SaveChanges();
            CollectResultAssembler assembler = new CollectResultAssembler();
            var serializedCollectLog = assembler.CreateCompressedSerializedExecutionLog(fakeSession, collectRequest);
            var collectResult = JsonConvert.DeserializeObject<IEnumerable<ExecutionLog>>(serializedCollectLog.ToUncompressedString());

            Assert.IsNotNull(serializedCollectLog);

            Assert.IsNotNull(collectResult);
            Assert.IsTrue(collectResult.Count() > 0);
        }
 public void MyTestInitialize() 
 {
     provider = new LocalDataProvider();
     session = provider.GetSession();            
 }