Пример #1
0
        public void SetProcessTime_WhenCurrentValueIsNotZero_ThrowInvalidOperationException()
        {
            // Arrange
            var dataReturnUpload = new DataReturnUpload(
                A.Dummy <Scheme>(),
                A.Dummy <string>(),
                A.Dummy <List <DataReturnUploadError> >(),
                A.Dummy <string>(),
                A.Dummy <int>(),
                A.Dummy <int>());

            dataReturnUpload.SetProcessTime(TimeSpan.FromSeconds(15));

            // Act
            Action action = () => dataReturnUpload.SetProcessTime(TimeSpan.FromSeconds(25));

            // Assert
            Assert.Throws <InvalidOperationException>(action);
        }
Пример #2
0
        public void SetProcessTime_WhenCurrentValueIsZero_SetProcessTime()
        {
            // Arrange
            var dataReturnUpload = new DataReturnUpload(
                A.Dummy <Scheme>(),
                A.Dummy <string>(),
                A.Dummy <List <DataReturnUploadError> >(),
                A.Dummy <string>(),
                A.Dummy <int>(),
                A.Dummy <int>());

            // Act
            dataReturnUpload.SetProcessTime(TimeSpan.FromSeconds(15));

            // Assert
            Assert.Equal(TimeSpan.FromSeconds(15), dataReturnUpload.ProcessTime);
        }