public void GetOfficeName_Test(string locationName, string expected) { // Arrange var locationDTO = new LocationDTO { Name = locationName }; // Act var result = LocationStringParserService.GetOfficeName(locationDTO); // Assert Assert.Equal(expected, result); }
public void GetOfficeName_Test_ThrowsArgumentException(string locationName) { // Arrange var locationDTO = new LocationDTO { Name = locationName }; // Act Action result = () => LocationStringParserService.GetOfficeName(locationDTO); // Assert Assert.Throws <ArgumentException>(result); }
public void GetOfficeName_Test_ThrowsNullReferenceException() { // Arrange var locationDTO = new LocationDTO { Name = null }; // Act Action result = () => LocationStringParserService.GetOfficeName(locationDTO); // Assert Assert.Throws <NullReferenceException>(result); }