예제 #1
0
        public void FindNotExistingRepository()
        {
            // Arrange
            var repoService = new RepoService(new MockRepoRepository());

            // Act
            var result = repoService.Find(Guid.NewGuid());

            // Assert
            Assert.IsNull(result);
        }
예제 #2
0
        public void CreateAndFindRepository()
        {
            // Arrange
            var repoName    = "TestRepo";
            var repoService = new RepoService(new MockRepoRepository());

            // Act
            var createdRepoId = repoService.Create(repoName);

            var actualRepo = repoService.Find(createdRepoId);

            // Assert
            Assert.AreEqual(repoName, actualRepo.Name);
        }