Ejemplo n.º 1
0
        public void Get_with_string_will_throw_if_item_doesnt_exist()
        {
            var sut       = new MediumRepository();
            var exception = Assert.Throws <EntityNotFoundException>(() => sut.GetById("non-existent-id"));

            exception.Message.Should().Contain("non-existent-id");
        }
Ejemplo n.º 2
0
        public void Can_get_all_known_mediums_by_id_as_string(string id)
        {
            var sut    = new MediumRepository();
            var result = sut.GetById(id);

            result.Id.Should().Be(id);
            result.Name.Should().NotBeNullOrWhiteSpace();
        }