示例#1
0
        public void ConvertThrowsIfFileStateIsAndInvalidDiffState(FileState fileState)
        {
            // Act and Assert
            var ex = Assert.Throws <InvalidOperationException>(() => HgRepository.Convert(fileState));

            Assert.Equal(String.Format("Unsupported status '{0}'.", fileState.ToString()), ex.Message);
        }
示例#2
0
        public void ConvertMapsToChangeTypeForKnonwStates(FileState fileState, ChangeType expected)
        {
            // Act
            ChangeType actual = HgRepository.Convert(fileState);

            // Assert
            Assert.Equal(expected, actual);
        }
示例#3
0
        public void ConvertThrowsIfFileStateIsInvalid()
        {
            // Arrange
            FileState fileState = (FileState)12;

            // Act and Assert
            var ex = Assert.Throws <InvalidOperationException>(() => HgRepository.Convert(fileState));

            Assert.Equal("Unsupported status '12'.", ex.Message);
        }