public void Process_WithNewBaseLayoutItemNull_SetsFieldValueToEmptyString() { // Arrange var args = new SaveBaseLayoutArgs(MasterFakesFactory.CreateFakeItem()); var processor = new SaveNewBaseLayout(); // Act processor.Process(args); // Assert Assert.Equal(string.Empty, args.Item.InnerItem.Fields[BaseLayoutItem.BaseLayoutFieldId].Value); }
public void Process_WithNewBaseLayoutItemNull_SetsSuccessfulTrue() { // Arrange var args = new SaveBaseLayoutArgs(MasterFakesFactory.CreateFakeItem()); var processor = new SaveNewBaseLayout(); // Act processor.Process(args); // Assert Assert.True(args.Successful); }
public void Process_WithNewBaseLayoutItemNotNull_SetsFieldValueToIdString() { // Arrange var item = MasterFakesFactory.CreateFakeItem(); var item2 = MasterFakesFactory.CreateFakeItem(); var args = new SaveBaseLayoutArgs(item) { NewBaseLayoutItem = item2 }; var processor = new SaveNewBaseLayout(); // Act processor.Process(args); // Assert Assert.Equal(item2.ID.ToString(), args.Item.InnerItem.Fields[BaseLayoutItem.BaseLayoutFieldId].Value); }