コード例 #1
0
    public IScrollerElementMotorProcessConstArg CreateMockConstArg()
    {
        IScrollerElementMotorProcessConstArg arg = Substitute.For <IScrollerElementMotorProcessConstArg>();

        arg.scroller.Returns(Substitute.For <IScroller>());
        arg.scrollerElement.Returns(Substitute.For <IUIElement>());
        arg.dimension.Returns(0);
        arg.processManager.Returns(Substitute.For <IProcessManager>());
        return(arg);
    }
コード例 #2
0
    public void Run_CallsScrollerSetRunningMotorProcessThis()
    {
        IScrollerElementMotorProcessConstArg arg = CreateMockConstArg();
        IScroller scroller = arg.scroller;
        TestScrollerElementMotorProcess process = new TestScrollerElementMotorProcess(arg);

        process.Run();

        scroller.Received(1).SwitchRunningElementMotorProcess(process, 0);
    }
コード例 #3
0
 public AbsScrollerElementMotorProcess(IScrollerElementMotorProcessConstArg arg) : base(arg)
 {
     thisScroller        = arg.scroller;
     thisScrollerElement = arg.scrollerElement;
     thisDimension       = arg.dimension;
 }
コード例 #4
0
 public TestScrollerElementMotorProcess(IScrollerElementMotorProcessConstArg arg) : base(arg)
 {
 }