Exemple #1
0
        public void ExportTest()
        {
            Guid                  expectedGuid        = Guid.NewGuid();
            const string          expectedUrl         = "https://github.com/Leginiel/ValkyrDoc";
            const string          expectedDescription = "ValkyrDoc Github";
            UrlDocumentationEntry entry             = new UrlDocumentationEntry(expectedGuid, expectedDescription, expectedUrl);
            Mock <IExportService> exportServiceMock = new Mock <IExportService>();

            exportServiceMock.Setup(exportService => exportService.WriteUrl(expectedDescription, expectedUrl));
            entry.Export(exportServiceMock.Object);
            exportServiceMock.VerifyAll();
        }
Exemple #2
0
        public void TestCreationOfObject()
        {
            Guid         expectedGuid        = Guid.NewGuid();
            const string expectedUrl         = "https://github.com/Leginiel/ValkyrDoc";
            const string expectedDescription = "ValkyrDoc Github";

            UrlDocumentationEntry entry = new UrlDocumentationEntry(expectedGuid, expectedDescription, expectedUrl);

            Assert.NotNull(entry);
            Assert.Equal(expectedGuid, entry.Identifier);
            Assert.Equal(expectedUrl, entry.Url);
            Assert.Equal(expectedDescription, entry.Description);
        }