public void ParseWithInvalidMobileNumberThrows(string invalidMobileNumber) { // Arrange // Act & Assert Assert.Throws <ArgumentException>(() => MobileNumber.Parse(invalidMobileNumber)); }
public void ConstructorWithInvalidNameThrows() { // Arrange var invalidName = ""; var dummyMobileNumber = MobileNumber.Parse("010-1234-1234"); // Act & Assert Assert.Throws <ArgumentException>(() => new Contract(invalidName, dummyMobileNumber)); }
public void ParseWithValidMobileNumberReturnsCorrectResult(string validMobileNumber) { // Arrange // Act var actual = MobileNumber.Parse(validMobileNumber); // Assert Assert.Equal(validMobileNumber, actual.Value); }
public void ConstructorWithValidNameCorrectlyInitializesName(string validName) { // Arrange var dummyMobileNumber = MobileNumber.Parse("010-1234-1234"); // Act var sut = new Contract(validName, dummyMobileNumber); // Assert string actual = sut.Name; Assert.Equal(validName, actual); }
public void ConstructorWithMobileNumberCorrectlyInitializesMobileNumber() { // Arrange var dummyName = "정진욱"; var mobileNumber = MobileNumber.Parse("010-1234-1234"); // Act var sut = new Contract(dummyName, mobileNumber); // Assert MobileNumber actual = sut.MobileNumber; Assert.Equal(mobileNumber.Value, actual.Value); }