Beispiel #1
0
 public TextureTask(string Name, RenderTarget2D RenderTarget, TaskType Type, TaskUsage Usage)
 {
     TaskName   = Name;
     TargetPing = RenderTarget;
     TaskType   = Type;
     TaskUsage  = Usage;
 }
        public void UpdateKLE_Given_Summary_Updates_TaskUsage()
        {
            //Arrange
            var       updateObjects = SetupUpdateObjects();
            const int taskUsageKey  = 1;
            var       taskUsage     = new TaskUsage
            {
                Id      = taskUsageKey,
                TaskRef = updateObjects.removedTaskRef
            };
            var taskUsages = new List <TaskUsage> {
                taskUsage
            };

            _mockTaskUsageRepository
            .Setup(s => s.GetWithReferencePreload(t => t.TaskRef))
            .Returns(taskUsages.AsQueryable);
            _mockTaskUsageRepository.Setup(s => s.RemoveRange(taskUsages));

            //Act
            _sut.UpdateKLE(0);

            //Assert
            _mockTaskUsageRepository.VerifyAll();
        }
Beispiel #3
0
 public TextureTask(string Name, TaskType Type, TaskStage Stage, TaskUsage Usage)
 {
     TaskName  = Name;
     TaskType  = Type;
     TaskStage = Stage;
     TaskUsage = Usage;
 }
Beispiel #4
0
 private static TaskUsageIntegrityInput MapIntegrityInput(TaskUsage arg)
 {
     return(new TaskUsageIntegrityInput
     {
         Id = arg.Id,
         TaskRefId = arg.TaskRef?.TaskKey ?? throw new InvalidOperationException("Unable to load task key of parent")
     });