Beispiel #1
0
 public void ShouldGetNullItemDefinitionIfNoItemFound(
     [Greedy] FakeDataProvider sut,
     ID itemId,
     CallContext context)
 {
     sut.GetItemDefinition(itemId, context).Should().BeNull();
 }
        public void ShouldGetItemDefinition([Greedy] FakeDataProvider sut, DbItem item, CallContext context)
        {
            // arrange
            sut.DataStorage.GetFakeItem(item.ID).Returns(item);

            // act
            var definition = sut.GetItemDefinition(item.ID, context);

            // assert
            definition.ID.Should().Be(item.ID);
            definition.Name.Should().Be(item.Name);
            definition.TemplateID.Should().Be(item.TemplateID);
            definition.BranchId.Should().Be(ID.Null);
        }