Created
April 25, 2016 20:07
-
-
Save vkhorikov/2a602e8c80abcf0a22233de0858930e0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| [Fact] | |
| public void SnackMachineRepository_NewSnackMachine_IsSaved() | |
| { | |
| SessionFactory.Init(@"Server=VLADIMIR-PC\SQL2014;Database=DddInPractice;Trusted_Connection=true"); | |
| var repository = new SnackMachineRepository(); | |
| var snackMachine = new SnackMachine(); | |
| snackMachine.LoadSnacks(1, new SnackPile(Chocolate, 1, 1m)); | |
| snackMachine.LoadSnacks(2, new SnackPile(Chocolate, 1, 1m)); | |
| snackMachine.LoadSnacks(3, new SnackPile(Chocolate, 1, 1m)); | |
| repository.Save(snackMachine); | |
| snackMachine.Id.Should().NotBe(0, "HiLo must work"); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment