Exemple #1
0
        public BookDtoMock Default()
        {
            Value.Author   = Fake.GetAuthorName(Key);
            Value.Title    = Fake.GetTitle(Key);
            Value.Language = Fake.GetLanguage();

            return(this);
        }
Exemple #2
0
        public UpdateBookCommandMock Default()
        {
            Value.Author   = Fake.GetAuthorName(Key);
            Value.Title    = Fake.GetTitle(Key);
            Value.Language = Fake.GetLanguage();

            return(this);
        }
        public BookMessageMock Default()
        {
            Value.Author   = Fake.GetAuthorName(Key);
            Value.Title    = Fake.GetTitle(Key);
            Value.Language = Fake.GetLanguage(Key);
            Value.Catalog  = Fake.GetCatalogName(Key);

            return(this);
        }
        public BookMock Default()
        {
            Value            = MockHelper.CreateModel <Book.Entities.Book>(Key);
            Value.AuthorName = Fake.GetAuthorName(Key);
            Value.Title      = Fake.GetTitle(Key);
            Value.Language   = Fake.GetLanguage(Key);

            return(this);
        }
        public void UpdateAsync_Book_Title_NotExists()
        {
            var key = FakeHelper.Key;

            var book = BookMock.Get(key);

            MockRepository.Add(book);

            var message = BookMessageMock.Get(key);

            message.Title  = Fake.GetTitle(FakeHelper.Key);
            message.Author = Fake.GetAuthorName(FakeHelper.Key);

            UpdateAsync(message);

            var entity = Db.Books.FirstOrDefault(x => x.Title == Fake.GetTitle(key));

            entity.Should().NotBeNull();

            var expected = BookMock.Get(key);

            entity.Should().BeEquivalentToEntity(expected);
        }
Exemple #6
0
        public BookAuthorMock Default()
        {
            Value.Name = Fake.GetAuthorName(Key);

            return(this);
        }