Exemple #1
0
        public void TestWindowsOverrideIdentityResolver()
        {
            var testOriginator = new CoreIdentity("overrideWindows", true);

            var provider          = new IdentityResolverOrchestration();
            var identityReference = provider.ResolveWindowsIdentity(testOriginator);

            Assert.IsFalse(string.IsNullOrWhiteSpace(identityReference));
            Assert.AreEqual(testOriginator.IdentityReference, identityReference);
        }
        public Book AddBookRequest(AddBookRequest request, [Identity] CoreIdentity originatorReference)
        {
            var newBook = new Book
            {
                Id          = Guid.NewGuid(),
                Title       = request.Title,
                Author      = request.Author,
                ReleaseDate = request.ReleaseDate
            };

            return(StubAdapter.Books.AddBook(newBook));
        }
Exemple #3
0
 public string ResolveWindowsIdentity([Identity] CoreIdentity originator = null)
 {
     return(originator?.IdentityReference);
 }
 public Book GetBook(Guid id, [Identity] CoreIdentity originatorReference)
 {
     return(StubAdapter.Books.GetBooks().Single(b => b.Id == id));
 }