public void NzbGetHistoryMapper(int id, string nzbName, int fileSize, string category, int health, int historyTime, string status, string name)
        {
            var source = new NzbGetHistoryResult
            {
                ID          = id,
                NZBName     = nzbName,
                FileSizeMB  = fileSize,
                Category    = category,
                Health      = health,
                HistoryTime = historyTime,
                Status      = status,
                Name        = name
            };
            var target = new NzbGetHistoryViewModel();

            target.InjectFrom(new NzbGetHistoryMapper(), source);

            Assert.That(target.Id, Is.EqualTo(id));
            Assert.That(target.NzbName, Is.EqualTo(nzbName));
            Assert.That(target.FileSize, Is.EqualTo(fileSize.ToString()));
            Assert.That(target.Category, Is.EqualTo(category));
            Assert.That(target.Health, Is.EqualTo(health));
            Assert.That(target.HistoryTime, Is.EqualTo(historyTime));
            Assert.That(target.Status, Is.EqualTo(status));
            Assert.That(target.Name, Is.EqualTo(name));
        }
Ejemplo n.º 2
0
        public void NzbGetHistoryMapper(int id, string nzbName, int fileSize, string category, int health, int historyTime, string status, string name)
        {
            var source = new NzbGetHistoryResult
            {
                ID = id,
                NZBName = nzbName,
                FileSizeMB = fileSize,
                Category = category,
                Health = health,
                HistoryTime = historyTime,
                Status = status,
                Name = name
            };
            var target = new NzbGetHistoryViewModel();
            target.InjectFrom(new NzbGetHistoryMapper(), source);

            Assert.That(target.Id, Is.EqualTo(id));
            Assert.That(target.NzbName, Is.EqualTo(nzbName));
            Assert.That(target.FileSize, Is.EqualTo(fileSize.ToString()));
            Assert.That(target.Category, Is.EqualTo(category));
            Assert.That(target.Health, Is.EqualTo(health));
            Assert.That(target.HistoryTime, Is.EqualTo(historyTime));
            Assert.That(target.Status, Is.EqualTo(status));
            Assert.That(target.Name, Is.EqualTo(name));
        }