Ejemplo n.º 1
0
        protected override void GivenThat()
        {
            base.GivenThat();

            PortableDeviceManager = new MockPortableDeviceManager();

            PortableDeviceFactory = GenerateMock <IPortableDeviceFactory>();
            PortableDeviceHelper  = GenerateMock <IPortableDeviceHelper>();
            DeviceStreamFactory   = GenerateMock <IDeviceStreamFactory>();

            PortableDevice        = GenerateMock <IPortableDevice>();
            PortableDeviceContent = GenerateMock <IPortableDeviceContent>();

            PortableDeviceFactory.Stub(factory => factory.Create("ABC123"))
            .Return(PortableDevice);

            PortableDevice.Stub(device => device.Content(out Arg <IPortableDeviceContent> .Out(PortableDeviceContent).Dummy));

            Device = new Device(PortableDeviceManager, PortableDeviceFactory, PortableDeviceHelper, DeviceStreamFactory, "ABC123");
        }