public void CheckImageFileSize_SelectImageThatIsAllowedSize_ResultIsTrue() { //Arrange byte[] bytes = new byte[500000]; var MaxLength = 512000; var result = false; //Act try { InputValidation.CheckImageFileSize(bytes, MaxLength); result = true; } catch (FileTooLargeException) { result = false; } //Assert Assert.True(result); }