Exemplo n.º 1
0
        public async Task GetUserGuidWorks()
        {
            var usageService = new UsageService(Substitute.For <IGitHubServiceProvider>(), environment, new JoinableTaskContext());
            var guid         = await usageService.GetUserGuid();

            Assert.IsTrue(guid.Equals(UserGuid));
        }
Exemplo n.º 2
0
        public async Task GetUserGuidWorksWhenFileMissing()
        {
            File.Delete(userFileName);

            var usageService = new UsageService(Substitute.For <IGitHubServiceProvider>(), environment, new JoinableTaskContext());
            var guid         = await usageService.GetUserGuid();

            Assert.AreNotEqual(guid, Guid.Empty);
        }