public void Test_IsCompanyNameEmpty() { var job = new Domain.Job(); var result = job.Company; if (result == null) { result = ""; } Assert.AreEqual("", result); }
public static Wizard FromEntity(Domain.Job entity) { var wizard = new Wizard() { Id = entity.Id, Title = entity.Title, Category = entity.Category, Description = entity.Description, CompanyName = entity.Company.Name, CompanyUrl = entity.Company.Url, CompanyLogoUrl = entity.Company.LogoUrl, CompanyEmail = entity.Company.Email, IsRemote = entity.IsRemote, JobType = entity.HireType, HowToApply = entity.HowToApply, LocationLatitude = entity.Location?.Latitude, LocationLongitude = entity.Location?.Longitude, LocationName = entity.Location?.Name, LocationPlaceId = entity.Location?.PlaceId }; if (entity.JoelTest != null) { wizard.HasSourceControl = entity.JoelTest.HasSourceControl; wizard.HasOneStepBuilds = entity.JoelTest.HasOneStepBuilds; wizard.HasDailyBuilds = entity.JoelTest.HasDailyBuilds; wizard.HasBugDatabase = entity.JoelTest.HasBugDatabase; wizard.HasBusFixedBeforeProceding = entity.JoelTest.HasBusFixedBeforeProceding; wizard.HasUpToDateSchedule = entity.JoelTest.HasUpToDateSchedule; wizard.HasSpec = entity.JoelTest.HasSpec; wizard.HasQuiteEnvironment = entity.JoelTest.HasQuiteEnvironment; wizard.HasBestTools = entity.JoelTest.HasBestTools; wizard.HasTesters = entity.JoelTest.HasTesters; wizard.HasWrittenTest = entity.JoelTest.HasWrittenTest; wizard.HasHallwayTests = entity.JoelTest.HasHallwayTests; } return(wizard); }