示例#1
0
        public void Show_CallsRepositoryGet()
        {
            // Assert that we hit the repository.
            LobbyRepository.DidNotReceive().Get(Arg.Any <long>());

            uut.Show(0);

            // Assert that we hit the repository.
            LobbyRepository.Received(1).Get(Arg.Any <long>());
        }
示例#2
0
        public void Create_CallsRepositoryAdd()
        {
            // Assert that we hit the repository.
            LobbyRepository.DidNotReceive().Add(Arg.Any <Lobby>());
            MyWork.DidNotReceive().Complete();

            var viewModel = new CreateLobbyViewModel()
            {
                Description = "Description",
                Name        = "Name"
            };

            uut.Create(viewModel);

            // Assert that we hit the repository.
            LobbyRepository.Received(1).Add(Arg.Any <Lobby>());
            MyWork.Received(1).Complete();
        }