public void EmployeFactory_Create_ShouldReturnTypeOfEmploye() { // Arrange & Act var employe = EmployeFactory.Create("Leonardo", 10000); // Assert Assert.IsType <Employe>(employe); }
public void EmployeFactory_Create_ShouldReturnPersonTypeDerivation() { // Arrange & Act var employe = EmployeFactory.Create("Leonardo", 10000); // Assert Assert.IsAssignableFrom <Person>(employe); }
public void Employe_Salary_ShouldReturnSalaryLessThanAllowed() { // Arrange & Act & Assert var exception = Assert.Throws <Exception>(() => EmployeFactory.Create("Leonardo", 250)); Assert.Equal("Salary less than allowed", exception.Message); }
public void Employe_Skills_ShouldNotHaveEmptySkills() { // Arrange & Act var employe = EmployeFactory.Create("Leonardo", 10000); // Assert Assert.All(employe.Skills, skills => Assert.False(string.IsNullOrWhiteSpace(skills))); }
public void Employe_Skills_JuniorShouldNotHaveAdvancedSkills() { // Arrange & Act var employe = EmployeFactory.Create("Leonardo", 1000); // Assert Assert.DoesNotContain("Microservices", employe.Skills); }
public void Employe_Skills_JuniorShouldHaveBasicSkills() { // Arrange & Act var employe = EmployeFactory.Create("Leonardo", 1000); // Assert Assert.Contains("OOP", employe.Skills); }
public void Employe_Skills_SeniorShouldHaveAllSkills() { // Arrange & Act var employe = EmployeFactory.Create("Leonardo", 15000); var basciSkills = new[] { "Programming logic", "OOP", "Tests", "Microservices" }; // Assert Assert.Equal(basciSkills, employe.Skills); }