The Japanese grammar patterns ~とおりだ, ~とおり(に)..., ~どおりだ, and ~どおり(に)... are used to express that something happens "according to," "just as," or "in the way that" something else was expected or described. These patterns are very common and are used in both written and spoken Japanese.

1. ~とおりだ / ~どおりだ

2. ~とおり(に)... / ~どおり(に)...

Difference Between とおり and どおり

Summary

These patterns are very useful when you want to emphasize that something matches a certain expectation, plan, or method.