private SenderUnderTest GetSenderUnderTest([CallerMemberName] string testName = null) { StorageService storageService = CreateStorageService(testName); PersistenceTransmitter transmitter = new PersistenceTransmitter(storageService, 0); return(new SenderUnderTest(StorageBaseMock.Object, transmitter)); }
public void Setup() { this.StorageBaseMock = new Moq.Mock <StorageBase>(); this.TransmissionMock = new Moq.Mock <StorageTransmission>(string.Empty, new Uri("http://some/url"), new byte[] { }, string.Empty, string.Empty); var transmitter = new PersistenceTransmitter(new Storage(string.Empty), 0); this.Sender = new SenderUnderTest(this.StorageBaseMock.Object, transmitter); this.deleteCount = 0; this.StorageBaseMock.Setup((storage) => storage.Delete(It.IsAny <StorageTransmission>())) .Callback(() => this.deleteCount++); }
public SenderTests() { StorageBaseMock = new Mock <BaseStorageService>(); TransmissionMock = new Mock <StorageTransmission>(string.Empty, new Uri("http://some/url"), new byte[] { }, string.Empty, string.Empty); StorageService storageService = CreateStorageService(); PersistenceTransmitter transmitter = new PersistenceTransmitter(storageService, 0); Sender = new SenderUnderTest(StorageBaseMock.Object, transmitter); _deleteCount = 0; StorageBaseMock.Setup(storage => storage.Delete(It.IsAny <StorageTransmission>())) .Callback(() => _deleteCount++); }
internal SenderUnderTest(BaseStorageService storage, PersistenceTransmitter transmitter) : base(storage, transmitter, false) { }
internal SenderUnderTest(StorageBase storage, PersistenceTransmitter transmitter) : base(storage, transmitter, startSending: false) { }