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); }
public void ConvertMapsToChangeTypeForKnonwStates(FileState fileState, ChangeType expected) { // Act ChangeType actual = HgRepository.Convert(fileState); // Assert Assert.Equal(expected, actual); }
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); }