Esempio n. 1
0
        public void Should_Be_Valid_Command()
        {
            var _validCommand = new CreateVideoCommand(Guid.NewGuid(), "Video 1", VideoMock.GetFakeValidVideo(), "c:");

            _validCommand.Validate();
            Assert.True(!_validCommand.IsInvalid);
        }
        public CreateVideoHandlerTest()
        {
            _fakeServerRepository = new FakeServerRepository(_dataContextMock);
            _fakeVideoRepository  = new FakeVideoRepository(_dataContextMock);
            _invalidCommand       = new CreateVideoCommand(new Guid(), "", VideoMock.GetFakeInvalidVideo(), "");
            var serverID = _dataContextMock.Servers.FirstOrDefault();

            _validCommand = new CreateVideoCommand(serverID.Id, "Video 01", VideoMock.GetFakeValidVideo(), "c:");
        }