public void Name_IsGet()
        {
            // Arrange
            var command = new GetCommand(VocabularyStubFactory.Stub());

            // Assert
            Assert.AreEqual(command.Name, "get");
        }
        public void Execute_PassNull_ThrowsArgumentNullException()
        {
            // Arrange
            var command = new GetCommand(VocabularyStubFactory.Stub());

            // Assert
            Assert.Throws <ArgumentNullException>(() => command.Execute(null));
        }
Beispiel #3
0
        public void Name_IsAdd()
        {
            // Arrange
            var command = new AddCommand(VocabularyStubFactory.Stub());

            // Assert
            Assert.AreEqual(command.Name, "add");
        }
Beispiel #4
0
        public void Name_IsDelete()
        {
            // Arrange
            var command = new DeleteCommand(VocabularyStubFactory.Stub());

            // Assert
            Assert.AreEqual(command.Name, "delete");
        }
        public void Execute_PassEmptyParameters_ReturnsWordOrMeansAreNotSet()
        {
            // Arrange
            var command = new GetCommand(VocabularyStubFactory.Stub());

            // Act
            var result = command.Execute(new string[0]);

            // Assert
            Assert.AreEqual(result, Default.WordIsNotSet);
        }
Beispiel #6
0
        public void Execute_PassOnlyWordWithoutMeans_ReturnsMeansAreNotSet()
        {
            // Arrange
            var word    = "aaa";
            var command = new AddCommand(VocabularyStubFactory.Stub());

            // Act
            var result = command.Execute(new[] { word });

            // Assert
            Assert.AreEqual(result, Default.MeansAreNotSet);
        }