Brain Teaser: Update the above code such that that unit tests pass. Do not update the content of the unit tests (however you are allowed to switch off of xUnit if you like).
Last active
July 2, 2020 00:02
-
-
Save Keboo/de8b28128e4952444cddffc054a7f819 to your computer and use it in GitHub Desktop.
Brain Teaser: Collection fun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CollectionTests | |
{ | |
public class HazStuff | |
{ | |
//TODO | |
} | |
public class Tests | |
{ | |
[Fact] | |
public void CanAddStringz() | |
{ | |
var stuff = new HazStuff | |
{ | |
Stuff = { "thing1", "thing2" } | |
}; | |
Assert.Equal(new[] { "thing1", "thing2" }, stuff.Stuff); | |
} | |
[Fact] | |
public void CanAddNumberz() | |
{ | |
var stuff = new HazStuff | |
{ | |
Stuff = { 41, 42 } | |
}; | |
Assert.Equal(new[] { "thing41", "thing42" }, stuff.Stuff); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment