CreateHistory() public method

public CreateHistory ( IScheduledResource resource ) : IList
resource IScheduledResource
return IList
 public void ClientScheduledResourceModel_CreateHistory_ReturnsListOfIResourceHistory()
 {
     //------------Setup for test--------------------------
     var scheduledResourceForTest = new ScheduledResourceForTest();
     var resourceHistory = new ResourceHistoryForTest();
     var listOfHistoryResources = new List<IResourceHistory> { resourceHistory };
     Dev2JsonSerializer serializer = new Dev2JsonSerializer();
     var serializeObject = serializer.SerializeToBuilder(listOfHistoryResources);
     var mockEnvironmentModel = new Mock<IEnvironmentModel>();
     var mockConnection = new Mock<IEnvironmentConnection>();
     mockConnection.Setup(connection => connection.IsConnected).Returns(true);
     mockConnection.Setup(connection => connection.ExecuteCommand(It.IsAny<StringBuilder>(), It.IsAny<Guid>())).Returns(serializeObject);
     mockConnection.Setup(connection => connection.WorkspaceID).Returns(Guid.NewGuid());
     mockEnvironmentModel.Setup(model => model.Connection).Returns(mockConnection.Object);
     var clientScheduledResourceModel = new ClientScheduledResourceModel(mockEnvironmentModel.Object);
     //------------Execute Test---------------------------
     var resourceHistories = clientScheduledResourceModel.CreateHistory(scheduledResourceForTest);
     //------------Assert Results-------------------------
     mockConnection.Verify(connection => connection.ExecuteCommand(It.IsAny<StringBuilder>(), It.IsAny<Guid>()), Times.Once());
     Assert.AreEqual(1, resourceHistories.Count);
 }