示例#1
0
        public void ReadModelRepositoryShouldUpdateAnItem()
        {
            var guid = Guid.NewGuid();
            var item = new Test(guid)
            {
                Name = "Testitem"
            };
            var itemUpdate = new Test(guid)
            {
                Name = "Testitem Update"
            };

            var repository = new TestModelRepository();

            repository.Add(item);
            repository.Update(itemUpdate);
            repository.GetById(guid).Name.Should().Be("Testitem Update");
        }
示例#2
0
        public void ReadModelRepositoryShouldReturnNullIfNotItemFound()
        {
            var repository = new TestModelRepository();

            repository.GetById(Guid.NewGuid()).Should().Be(null);
        }