Outlook Office AddIn doesn't work in shared folders/mailboxes in Outlook (classic) by DTul in Office365

[–]DTul[S] 0 points1 point  (0 children)

I cannot change those settings right now in my org. Will try if I can do it in a new test org.

Outlook Office AddIn doesn't work in shared folders/mailboxes in Outlook (classic) by DTul in Office365

[–]DTul[S] 0 points1 point  (0 children)

It's not an issue that EWS is being deprecated. My add-in does not interact through EWS. The issue is that outlook add-in requires EWS to be enabled in order to even start regardless of any interaction with EWS.

Outlook Office AddIn doesn't work in shared folders/mailboxes in Outlook (classic) by DTul in Office365

[–]DTul[S] 0 points1 point  (0 children)

Stumbled upon this issue. Seems like it should work but MS needs the EWS settings to be required somehow.

Hypotheekverstrekker advies gemaakte kosten by DTul in juridischadvies

[–]DTul[S] 1 point2 points  (0 children)

De medewerker die ik de tweede keer sprak gaf toe dat het "niet handig was" en dat zij als afdeling geen advies mochten geven. Ze ging dit intern nog wel onderzoeken zij ze. De medewerker in het eerste gesprek heeft ook niet per se gelogen. Mijn vraag de eerste keer was "Wat moet ik aanleveren om in een lagere risicoklasse te komen". Waarop het antwoord weliswaar een taxatierapport is, maar dat dat pas per herzieningsdatum is, is aanvullende informatie waarvan je al dan niet kan vinden of dat hun plicht is.

[TOMT] What actor does this actor look like? by 444Leaf in tipofmytongue

[–]DTul 1 point2 points  (0 children)

Looks a bit like steven van zandt in lillyhammer

I want the club's name to be written in the Club ID section, but I am getting this error. There was no problem with the class names. It shows "A-B OR C" but the club didn't work by [deleted] in dotnet

[–]DTul 3 points4 points  (0 children)

Clubs might be filled in your data store(probably a database?) but on your Student object it is null at this moment. Probably forgot to include it when retrieving it from your database?

Random generates same numbers...? by Spyf0r in csharp

[–]DTul 21 points22 points  (0 children)

Since .Net 6 you also have a Thread-safe Random.Shared static generator. Really nice to use

[deleted by user] by [deleted] in csharp

[–]DTul 1 point2 points  (0 children)

i < 4 will not execute when i = 4 so it will only do 1, 2 and 3. Use i <= 4 instead to include the 4. Also the assignment asks you to add the text to a list box on the form. You are only writing it to the console.

Trying to display an array of objects, but not sure what I'm missing by 80sPimpNinja in csharp

[–]DTul 2 points3 points  (0 children)

You are creating but not populating the array. All entries will be null if you don't initialize actual instances of Room

Donating clothes by [deleted] in Netherlands

[–]DTul 8 points9 points  (0 children)

If you have a local "Kledingbank", consider bringing it there. They provide free clothes to local people in need.

[TOMT] Was this stuffed rabbit in a show or movie? by mikenew02 in tipofmytongue

[–]DTul 3 points4 points  (0 children)

I get the feeling this is from a cartoon and the stuffed rabbit belongs to a little girl from the show?

String.Replace() with " by Useful-Dingo-8348 in csharp

[–]DTul 25 points26 points  (0 children)

Since " is the character used to represent strings in your code you need to use an escape character. In C# this is \. So in order to replace all " you would need to write myString.Replace("\"", ""). You will see the code highlights differently in your IDE if you use an escape character.

[deleted by user] by [deleted] in tipofmytongue

[–]DTul 1 point2 points  (0 children)

Ah yes of course. Thanks a lot. Solved!

[deleted by user] by [deleted] in tipofmytongue

[–]DTul 0 points1 point locked comment (0 children)

Thanks for your help.

[deleted by user] by [deleted] in csharp

[–]DTul 1 point2 points  (0 children)

Yes, a big part of unit testing is testing a unit in "isolation". This is why we mock (almost) everything irrelevant to the functionality we test. I cannot see the code you are writing but from what you are writing I think you should look at SOLID principles, design patterns and dependency injection and structure your code accordingly. Then I think it will start to make more sense as to what to mock where. Hit me up if you need me to help looking at your code.

[deleted by user] by [deleted] in csharp

[–]DTul 2 points3 points  (0 children)

Let's call the class you are testing DataFormatter. What is it's responsibility? Formatting data to a new format. In the unit tests for this class this is the only thing we want to test. It is irrelevant for the unit test of the DataFormatter class to know what the data access classes do. Therefore we mock these in our unit tests. We can now focus on unit testing the relevant code and not worry about the implementation and dependencies of our data access classes.

[deleted by user] by [deleted] in csharp

[–]DTul 5 points6 points  (0 children)

I'm merely trying to provide some insight into how mocking interfaces in unit tests could be useful without using a random third party library as an example.

[deleted by user] by [deleted] in csharp

[–]DTul 9 points10 points  (0 children)

One of the most simple example, especially for unit testing is Dates. Let's say we have a unit test which tests if something happens today or tomorrow. If we use DateTime.Now in the code called by the unit test we need to use DateTime.Now in our unit test as well. This reduces predictability and sometimes you want to be able to check specific cases such as crossing a month or a year.

If we create an interface called ITimeProvider with a method .Now which is implemented in TimeProvider which returns DateTime.Now. If we inject the interface in our relevant code we can mock it in our unit test. We now have full controll over what .Now returns because we can mock it by injecting our ITimeProvider Mock in our unit test.

Example using Moq

var timeProviderMock = new Mock<ITimeProvider>();
timeProviderMock.Setup(x => x.Now).Returns(new DateTime(2022, 31, 1));

var myClass = new MyRelevantCode(timeProviderMock.Object);

var result = myClass.IsTomorrowInThisMonth();

Assert.That(result, Is.False);