- Fork this repository.
- Add ONE of the following GitHub profiles as a collaborator to your forked repo:
memcmahon
,rtillies
,zoefarrell
- Clone your repo to your local machine.
- Open your cloned repository in Visual Studio.
- Insert your name on line 1 to replace
<YOUR NAME HERE>
above.
Important Answer these questions in this file on your main
branch. When finished with the questions, commit and push your main branch. You do not need to create a pull request yet!
-
What does TDD stand for?
-
What are three benefits of using TDD?
-
Imagine you are in an interview. The interviewer asks: How do you use TDD? How would you answer?
-
For the class below, outline the tests you would need. Try to use as much C# syntax as possible. The first test has been provided for you. (this question is worth 4 points)
public class Dog
{
public string Name { get; }
public string Breed { get; }
public bool IsHungry { get; private set; }
public Dog(string name, string breed)
{
Name = name;
Breed = breed;
IsHungry = true;
}
public void Eat()
{
IsHungry = false;
}
public void Sleep()
{
IsHungry = true;
}
public string Speak()
{
return "Bark Bark!";
}
}
// Add your tests here
[Fact]
public void DogHasNameAttribute()
{
Dog dog = new Dog("Nile", "Golden Retriever");
Assert.Equal("Nile", dog.Name);
}
-
What is a merge conflict, and when might you encounter one?
-
You and a partner are working on a project together. Your partner is working on aa-branch; you are working on bb-branch. In as much detail as possible, describe how you both would get your work combined onto the main branch.
-
Why is it good practice to have someone else approve and/or merge your PR?
Before moving on to the next section, commit your work and push your main branch!
-
Create a new branch called
elephants
(1 point) -
Add the following to the end of the Animal Tracker file:
Elephants
- African Savanna
- Asian
- African Forest
-
Commit this change to the Animal Tracker file with an appropriate message. (1 point)
-
Create the following files with the listed contents:
African Savanna.txt
Average shoulder height: 2.6-3.2 meters
Average mass: 3.3-6.6 short tons
Asian Elephant.txt
Average shoulder height: 2.4-2.8 meters
Average mass: 3.0-4.4 short tons
African Forest Elephant.txt
Average shoulder height: 1.8-3.0 meters
Average mass: 2,000-7,000 kilograms
-
Add and Commit these new files with an appropriate message. (1 point)
-
Push your
elephants
branch to GitHub. (1 point) -
Create a Pull Request in GitHub. Write a short description of the changes you made to the repo. (1 point)
-
Request a review from your collaborator. (1 point)
Submit the Assessment Submission form linked in your cohort slack channel!
This assessment has a total of 16 Points. Earning 11 or more points is a pass and will indicate that you are progressing well with the material.
As a reminder, this assessment is for students and instructors to determine if there are any areas that need additional reinforcement!